Introduction to Differential Equations and Numerical Methods

Verifying Solutions to Differential Equations

  • A differential equation involves a function yy and one or more of its derivatives. To check if a given expression is a solution, one must determine the necessary derivatives and substitute them into the original equation.

  • Example Verification:

    • Given differential equation: y3y+2y=24y'' - 3y' + 2y = 24
    • Possible solution: y=3ex+4e2x+2e2xy = 3e^x + 4e^{2x} + 2e^{-2x}
    • First derivative (yy'):
      • Using the chain rule: ddx(3ex)=3ex\frac{d}{dx}(3e^x) = 3e^x
      • ddx(4e2x)=8e2x\frac{d}{dx}(4e^{2x}) = 8e^{2x}
      • ddx(2e2x)=4e2x\frac{d}{dx}(2e^{-2x}) = -4e^{-2x}
      • Result: y=3ex+8e2x4e2xy' = 3e^x + 8e^{2x} - 4e^{-2x}
    • Second derivative (yy''):
      • ddx(3ex)=3ex\frac{d}{dx}(3e^x) = 3e^x
      • ddx(8e2x)=16e2x\frac{d}{dx}(8e^{2x}) = 16e^{2x}
      • ddx(4e2x)=8e2x\frac{d}{dx}(-4e^{-2x}) = 8e^{-2x}
      • Result: y=3ex+16e2x+8e2xy'' = 3e^x + 16e^{2x} + 8e^{-2x}
    • Substitution and Simplification:
      • Term 1 (yy''): 3ex+16e2x+8e2x3e^x + 16e^{2x} + 8e^{-2x}
      • Term 2 (3y-3y'): 3(3ex+8e2x4e2x)=9ex24e2x+12e2x-3(3e^x + 8e^{2x} - 4e^{-2x}) = -9e^x - 24e^{2x} + 12e^{-2x}
      • Term 3 (2y2y): 2(3ex+4e2x+2e2x)=6ex+8e2x+4e2x2(3e^x + 4e^{2x} + 2e^{-2x}) = 6e^x + 8e^{2x} + 4e^{-2x}
    • Summation of exponents:
      • exe^x terms: 39+6=03 - 9 + 6 = 0
      • e2xe^{2x} terms: 1624+8=016 - 24 + 8 = 0
      • e2xe^{-2x} terms: 8+12+4=248 + 12 + 4 = 24
    • Result: 24=2424 = 24. This expression is indeed a solution to the differential equation.

The Order of Differential Equations

  • The order of a differential equation is defined as the highest order of derivative that appears in the equation. This is analogous to the degree of a polynomial, which is the highest power found within it.

  • Examples of Order:

    • y=2xy' = 2 - x: This contains only a first derivative, making it a first-order differential equation.
    • y3y+2y=24y'' - 3y' + 2y = 24: The highest derivative is the second derivative, making it a second-order differential equation.
    • An equation containing yy''' is a third-order differential equation.
  • Notation for Higher Orders:

    • Beyond high orders (typically after the third derivative), the use of apostrophes/primes becomes impractical (e.g., writing ten apostrophes for the tenth derivative).
    • Instead, higher derivatives are written with a superscript in parentheses, such as y(4)y^{(4)} for the fourth derivative or y(10)y^{(10)} for the tenth derivative.
    • Context is usually sufficient to distinguish these from powers (e.g., y4y^4). In differential equations, one would not typically take a negative derivative or a fractional derivative (like a half-derivative) in this context.

General vs. Particular Solutions

  • A general solution contains an arbitrary constant, usually denoted as CC. This constant represents the fact that many different functions can satisfy the same relationship between derivatives, because the derivative of a constant is zero.

  • A particular solution is a specific function that solves the equation and satisfies a given set of conditions, where a specific value for CC has been determined.

  • Examples:

    • For the equation y=2xy' = 2x, the solution y=x2y = x^2 is a solution, but so is y=x2+1y = x^2 + 1.
    • The general solution is y=x2+Cy = x^2 + C, where the value of CC is not yet chosen.
    • A particular solution might be y=x2+1y = x^2 + 1.

Initial Value Problems (IVP)

  • When a differential equation is accompanied by a condition, such as a requirement that the solution function y=f(x)y = f(x) passes through a specific point (x,y)(x, y), it is called an initial value problem.

  • Initial conditions help model real-world situations where the starting state is known (e.g., position at time t=0t=0, temperature at start time).

  • Example: Solving y=2xy' = 2 - x through point (2,7)(2, 7)

    • Step 1 (General Solution): Integrate both sides to find the antiderivative: y=2xx22+Cy = 2x - \frac{x^2}{2} + C.
    • Step 2 (Particular Solution): Substitute the point inputs (x=2x=2, y=7y=7) to find CC.
    • 7=2(2)(2)22+C7 = 2(2) - \frac{(2)^2}{2} + C
    • 7=42+C7 = 4 - 2 + C
    • 7=2+CC=57 = 2 + C \rightarrow C = 5
    • Particular Solution: y=2xx22+5y = 2x - \frac{x^2}{2} + 5.
  • Example: Anti-derivative for y=4x+3y' = 4x + 3 passing through (1,7)(1, 7)

    • Antiderivative: y=2x2+3x+Cy = 2x^2 + 3x + C.
    • Substitute values: 7=2(1)2+3(1)+C7 = 2(1)^2 + 3(1) + C.
    • 7=2+3+C7 = 2 + 3 + C
    • 7=5+CC=27 = 5 + C \rightarrow C = 2
    • Particular Solution: y=2x2+3x+2y = 2x^2 + 3x + 2.
  • Further Verification Example:

    • Equation: y+2y=ety' + 2y = e^t with initial condition y(0)=3y(0) = 3.
    • Possible solution: y=2e2t+ety = 2e^{-2t} + e^t.
    • Check condition: y(0)=2e0+e0=2(1)+1=3y(0) = 2e^0 + e^0 = 2(1) + 1 = 3. Satisfied.
    • Check derivative: y=4e2t+ety' = -4e^{-2t} + e^t.
    • Plug into equation: (4e2t+et)+2(2e2t+et)(-4e^{-2t} + e^t) + 2(2e^{-2t} + e^t).
    • 4e2t+et+4e2t+2et=3et-4e^{-2t} + e^t + 4e^{-2t} + 2e^t = 3e^t. (Note: There was a adjustment in calculation during the session; the goal was to verify if the function satisfies the specific differential relationships provided).

Physics Application: Gravity and Motion

  • This modeling utilizes the relationships between acceleration, velocity, and position via derivatives and integrals.

    • Velocity v(t)v(t) is the derivative of position s(t)s(t). (s(t)=v(t)s'(t) = v(t)).
    • Acceleration a(t)a(t) is the derivative of velocity v(t)v(t). (v(t)=a(t)v'(t) = a(t)).
  • Scenario: A baseball (m=0.15kgm = 0.15\,kg) is thrown upward from a height of 3m3\,m with an initial velocity of 10m/s10\,m/s. Gravity is the only force (a=9.8m/s2a = -9.8\,m/s^2).

  • Step 1: Finding Velocity v(t)v(t)

    • v(t)=9.8v'(t) = -9.8
    • Antiderivative: v(t)=9.8t+Cv(t) = -9.8t + C.
    • Initial velocity v(0)=1010=9.8(0)+CC=10v(0) = 10 \rightarrow 10 = -9.8(0) + C \rightarrow C = 10.
    • Velocity function: v(t)=9.8t+10v(t) = -9.8t + 10.
    • Velocity at t=2t=2: v(2)=9.8(2)+10=19.6+10=9.6m/sv(2) = -9.8(2) + 10 = -19.6 + 10 = -9.6\,m/s. (The ball is moving downward).
  • Step 2: Finding Position s(t)s(t)

    • s(t)=9.8t+10s'(t) = -9.8t + 10
    • Antiderivative: s(t)=4.9t2+10t+Cs(t) = -4.9t^2 + 10t + C.
    • Initial height s(0)=33=4.9(0)+10(0)+CC=3s(0) = 3 \rightarrow 3 = -4.9(0) + 10(0) + C \rightarrow C = 3.
    • Position function: s(t)=4.9t2+10t+3s(t) = -4.9t^2 + 10t + 3.
  • Note: For this calculation, the mass (0.15kg0.15\,kg) of the ball is irrelevant to finding the position and velocity in a vacuum (gravity-only) scenario.

Direction Fields (Slope Fields)

  • When an explicit solution is difficult to find, numerical or graphical methods provide insight. A direction field is a graph consisting of small arrows representing the slope of the tangent line (yy') at various points (x,y)(x, y).

  • Mechanism:

    • The output of the differential equation y=f(x,y)y' = f(x, y) describes the slope of the tangent line at that point.
    • Arrows track where the curve is moving. If a curve passes through a point, it must follow the direction of the arrow at that point.
  • Dependences:

    • If the equation involves only yy (e.g., y=0.4y(1y72)y' = 0.4y(1 - \frac{y}{72})), the slopes are consistent across all xx values for a fixed yy. These are often seen in fluid dynamics or population modeling.
    • If the equation involves both xx and yy (e.g., y=3x+2y4y' = 3x + 2y - 4), every point (x,y)(x, y) must be calculated individually.
  • Equilibrium Solutions:

    • An equilibrium solution occurs when the derivative yy' is zero for all xx, resulting in a constant horizontal line solution.
    • Example: y=(x3)(y2)(y+2)y' = (x - 3)(y - 2)(y + 2).
    • Setting y=0y' = 0 yields horizontal solutions at y=2y = 2 and y=2y = -2.
    • While x=3x = 3 also makes the derivative zero, it represents a vertical line, which is not a function and therefore not a valid solution for y(x)y(x).

Euler's Method (Numerical Approximation)

  • Euler's Method uses linear approximations to estimate points on a solution curve when an antiderivative cannot be found.

  • Formula for Linearization: L(x)=f(a)(xa)+f(a)L(x) = f'(a)(x - a) + f(a).

  • Example Process (y=x2y2y' = x^2 - y^2 starting at (1,2)(-1, 2)):

    • 1. Calculate the initial slope: y(1,2)=(1)2(2)2=14=3y'(-1, 2) = (-1)^2 - (2)^2 = 1 - 4 = -3.
    • 2. Define the linearization function at this point: L(x)=3(x(1))+2=3(x+1)+2L(x) = -3(x - (-1)) + 2 = -3(x + 1) + 2.
    • 3. Take a small step (hh or Δx\Delta x) to a new xx value, e.g., from x=1x = -1 to x=0.9x = -0.9.
    • 4. Estimate the new yy value: y(0.9)3(0.9+1)+2=3(0.1)+2=1.7y(-0.9) \approx -3(-0.9 + 1) + 2 = -3(0.1) + 2 = 1.7.
    • 5. Use the new point (0.9,1.7)(-0.9, 1.7) to find a new slope for the next step:
      • y=(0.9)2(1.7)2=0.812.89=2.08y' = (-0.9)^2 - (1.7)^2 = 0.81 - 2.89 = -2.08.
    • 6. Rebuild the linearization: L2(x)=2.08(x(0.9))+1.7L_2(x) = -2.08(x - (-0.9)) + 1.7.
    • 7. Continue this process iteratively to follow the curve.
  • Critical Observations:

    • The accuracy of Euler's method depends on the step size. Smaller steps lead to better estimations but more calculations.
    • It is an estimation off of an underestimation/overestimation, meaning it can accumulate error as you move further from the starting point.

Questions & Discussion

  • Question: How do you make the notation for the fourth derivative unique from a power?

  • Response: In the context of differential equations, parentheses are used around the superscript, like y(4)y^{(4)}. Furthermore, context usually clarifies it because it is unlikely a specific power would be present without indicating a derivative in this curriculum. One wouldn't typically have something like a "half-derivative" in this basic context either.

  • Question: Is the initial point irrelevant in the slope field verification problem?

  • Response: No, the initial condition was satisfied earlier in that problem (y(0)=3y(0) = 3). Often, constants are absorbed into other functions during integration, so the point remains necessary to ensure the solution is particular to the given scenario.