E078 Section 5 Notes – Differential Equations

Source: Condensed from the Section 5 Study Guide (zyBooks 5.1–5.4). Not official WGU material.

Big idea. A differential equation (DE) tells you how a quantity changes; solving it means finding the quantity itself. Section 5.1 covers what a solution is and how an initial value picks one solution out of a family; 5.2 shows how to see solutions without solving (direction fields, equilibria) and approximate them (Euler's method); 5.3 solves exactly when you can separate xx and yy; 5.4 is the logistic model, a separable DE for populations with a ceiling.

5.1 Basics of Differential Equations

Big idea

  • A differential equation is an equation with an unknown function y=f(x)y = f(x) and one or more of its derivatives.

  • A solution is a function that makes the equation true when you plug it (and its derivatives) in.

  • The order is the highest derivative that appears. (y′)3(y')^3 is still order 1: a power is not a derivative.

  • The general solution is the whole family (it has a +C+C). A particular solution is one member.

  • An initial-value problem (IVP) is a DE plus initial value(s). You need as many initial values as the order.

  • To solve y′=f(x)y' = f(x): integrate both sides, then use the initial value to find CC.

Formulas

  • Verify a solution: compute y′y' (and y′′y'' if needed), substitute into the left side, simplify, compare to the right side.

  • Falling/thrown objects (only gravity, g=9.8g = 9.8 m/s per second, up is positive):

  • v′(t)=−g,  v(0)=v0  ⇒  v(t)=−9.8t+v0v'(t) = -g,\; v(0) = v_0 \;\Rightarrow\; v(t) = -9.8t + v_0

  • s′(t)=v(t),  s(0)=s0  ⇒  s(t)=−4.9t2+v0t+s0s'(t) = v(t),\; s(0) = s_0 \;\Rightarrow\; s(t) = -4.9t^2 + v_0 t + s_0

Worked example

  • Verify: is y=3e2x−xy = 3e^{2x} - x a solution of y′−2y=2x−1y' - 2y = 2x - 1? Compute y′=6e2x−1y' = 6e^{2x} - 1, then y′−2y=(6e2x−1)−2(3e2x−x)=2x−1y' - 2y = (6e^{2x} - 1) - 2(3e^{2x} - x) = 2x - 1. Yes.

  • IVP: y′=4x3−2cos⁡xy' = 4x^3 - 2\cos x, y(0)=5y(0) = 5. Integrate: y=x4−2sin⁡x+Cy = x^4 - 2\sin x + C; then 5=0−0+C5 = 0 - 0 + C, so C=5C = 5. Answer: y=x4−2sin⁡x+5y = x^4 - 2\sin x + 5.

  • Thrown ball: thrown upward from 2 m at 14.7 m/s. v(t)=−9.8t+14.7v(t) = -9.8t + 14.7, s(t)=−4.9t2+14.7t+2s(t) = -4.9t^2 + 14.7t + 2. Highest point when v=0v = 0: t=1.5t = 1.5 s, so s(1.5)=−4.9(2.25)+22.05+2=13.025s(1.5) = -4.9(2.25) + 22.05 + 2 = 13.025 m.

Common mistakes

  • Calling (y′)2(y')^2 "order 2". Order counts derivatives, not powers.

  • Forgetting +C+C before using the initial value, or plugging the initial value in before integrating.

  • Sign of gravity: with "up is positive," acceleration is −9.8-9.8. A negative velocity means falling.

5.2 Direction Fields and Numerical Methods

Big idea

  • For y′=f(x,y)y' = f(x,y), plug a point (x,y)(x,y) into the right side: that number is the slope of the solution through that point.

  • A direction (slope) field is a grid of little segments with those slopes. A solution curve follows the segments.

  • An equilibrium solution is a constant solution y=ky = k. Find it by setting the right side =0= 0 (for all xx).

  • Stability (look just above and just below y=ky = k): stable means both sides move toward kk; unstable means both sides move away; semi-stable means one side toward, one side away.

  • Euler's method: walk along tangent lines in steps of size hh. Smaller hh means more work but more accuracy.

Formulas

  • Euler: xn=x0+nhx_n = x_0 + nh, yn=yn−1+h f(xn−1,yn−1)y_n = y_{n-1} + h\,f(x_{n-1}, y_{n-1})

  • Stability by sign chart: for y′=g(y)y' = g(y), mark the zeros of gg on a number line and test a value in each interval. A ++ means yy goes up (arrow up), a −- means yy goes down.

Worked example

  • Slope at a point: for y′=x2−yy' = x^2 - y, the slope at (2,1)(2,1) is 22−1=32^2 - 1 = 3.

  • Equilibria and stability: y′=(y+2)(y−1)2y' = (y+2)(y-1)^2. Equilibria y=−2y = -2, y=1y = 1. Signs: y<−2y < -2: (−)(+)=−(-)(+) = - (down); −2<y<1-2 < y < 1: (+)(+)=+(+)(+) = + (up); y>1y > 1: ++ (up). At y=−2y = -2 below goes down and above goes up, both away, so unstable. At y=1y = 1 below goes up (toward) and above goes up (away), so semi-stable.

  • Euler, three steps: y′=x+yy' = x + y, y(0)=1y(0) = 1, h=0.1h = 0.1. y1=1+0.1(0+1)=1.1y_1 = 1 + 0.1(0 + 1) = 1.1; y2=1.1+0.1(0.1+1.1)=1.22y_2 = 1.1 + 0.1(0.1 + 1.1) = 1.22; y3=1.22+0.1(0.2+1.22)=1.362y_3 = 1.22 + 0.1(0.2 + 1.22) = 1.362. So y(0.3)≈1.362y(0.3) \approx 1.362. (Exact solution y=2ex−x−1y = 2e^x - x - 1 gives y(0.3)≈1.3997y(0.3) \approx 1.3997, so Euler undershoots a bit.)

  • Euler table habit: make columns nn, xnx_n, yny_n, f(xn,yn)f(x_n, y_n), yn+1=yn+h⋅fy_{n+1} = y_n + h \cdot f. Filling a table stops you from mixing up which xx and yy go into ff.

Common mistakes

  • In Euler, using the new xnx_n with the old yn−1y_{n-1}. Both inputs to ff come from the previous row.

  • Calling an equilibrium stable just because solutions on one side approach it (that is semi-stable).

5.3 Separable Equations

Big idea

  • Separable means you can write y′=f(x) g(y)y' = f(x)\,g(y): a function of xx times a function of yy.

  • Get all the yy's with dydy and all the xx's with dxdx, then integrate both sides. One +C+C is enough.

  • Values with g(y)=0g(y) = 0 are constant solutions; check them first (dividing by g(y)g(y) loses them).

  • After exponentiating, eCe^C is just a new constant; dropping the absolute value lets that constant be ±\pm.

  • If you can't solve for yy, an implicit answer is fine.

Formulas

  • The 5 steps: (1) find yy-values with g(y)=0g(y) = 0 (constant solutions); (2) rewrite as dyg(y)=f(x) dx\frac{dy}{g(y)} = f(x)\,dx; (3) integrate both sides; (4) solve for yy if possible; (5) use the initial condition to find CC.

  • Mixing tank: dudt=(rate in)−(rate out)\frac{du}{dt} = (\text{rate in}) - (\text{rate out}), where rate in == (concentration in)(flow in) and rate out =uV⋅(flow out)= \frac{u}{V} \cdot (\text{flow out}).

  • Newton's law of cooling: dTdt=k(T−Ts)  ⇒  T(t)=Ts+(T0−Ts)ekt\frac{dT}{dt} = k(T - T_s) \;\Rightarrow\; T(t) = T_s + (T_0 - T_s)e^{kt}, with k<0k < 0 for cooling or warming toward TsT_s.

Worked example

  • General solution: y′=xy2y' = xy^2. Constant solution y=0y = 0. Separate: dyy2=x dx⇒−1y=x22+C⇒y=−2x2+C\frac{dy}{y^2} = x\,dx \Rightarrow -\frac{1}{y} = \frac{x^2}{2} + C \Rightarrow y = \frac{-2}{x^2 + C} (and y=0y = 0).

  • IVP: dydx=2x+12y\frac{dy}{dx} = \frac{2x+1}{2y}, y(0)=3y(0) = 3. 2y dy=(2x+1) dx⇒y2=x2+x+C2y\,dy = (2x+1)\,dx \Rightarrow y^2 = x^2 + x + C, and 9=C9 = C. Take the positive root because y(0)=3>0y(0) = 3 > 0: y=x2+x+9y = \sqrt{x^2 + x + 9}.

  • Mixing tank: a 200 L tank holds 10 kg of salt; brine at 0.25 kg/L flows in at 4 L/min and the mixture flows out at 4 L/min. Rate in =0.25(4)=1= 0.25(4) = 1 kg/min, rate out =u200(4)=u50= \frac{u}{200}(4) = \frac{u}{50}, so u′=50−u50u' = \frac{50 - u}{50}, u(0)=10u(0) = 10. Separating gives −ln⁡∣50−u∣=t50+C⇒u=50−C1e−t/50-\ln|50 - u| = \frac{t}{50} + C \Rightarrow u = 50 - C_1 e^{-t/50}; 10=50−C110 = 50 - C_1 gives C1=40C_1 = 40. Answer: u(t)=50−40e−t/50u(t) = 50 - 40e^{-t/50}; long run u→50u \to 50 kg.

  • Newton's cooling: coffee at 190∘F190^\circ\text{F} in a 70∘F70^\circ\text{F} room is 150∘F150^\circ\text{F} after 10 min. T=70+120ektT = 70 + 120e^{kt}; 150=70+120e10k⇒e10k=23⇒k=ln⁡(2/3)10≈−0.04055150 = 70 + 120e^{10k} \Rightarrow e^{10k} = \frac{2}{3} \Rightarrow k = \frac{\ln(2/3)}{10} \approx -0.04055. For 100∘F100^\circ\text{F}: ekt=14⇒t=ln⁡(1/4)k≈34.2e^{kt} = \frac{1}{4} \Rightarrow t = \frac{\ln(1/4)}{k} \approx 34.2 min.

Common mistakes

  • Trying to separate y′=x+yy' = x + y. A sum of xx and yy is not separable (it can't be written as f(x)g(y)f(x)g(y)).

  • Writing ex2+C=ex2+eCe^{x^2 + C} = e^{x^2} + e^C. It's ex2⋅eC=C1ex2e^{x^2} \cdot e^C = C_1 e^{x^2}.

  • Taking the wrong square root sign: let the initial value decide.

5.4 The Logistic Equation

Big idea

  • Exponential growth P′=rPP' = rP grows forever. The logistic model adds a ceiling: the carrying capacity KK.

  • When PP is small, growth looks exponential. As P→KP \to K, growth slows. Above KK, PP decreases toward KK.

  • Equilibria: P=0P = 0 (unstable) and P=KP = K (stable).

  • The curve is S-shaped, with an inflection point at P=K/2P = K/2: that's where growth is fastest.

  • It's separable (and autonomous), solved with partial fractions.

Formulas

  • dPdt=rP(1−PK),  P(0)=P0  ⟹  P(t)=P0Kert(K−P0)+P0ert\frac{dP}{dt} = rP\left(1 - \frac{P}{K}\right),\; P(0) = P_0 \;\Longrightarrow\; P(t) = \frac{P_0 K e^{rt}}{(K - P_0) + P_0 e^{rt}}

  • Inflection (fastest growth): t=1rln⁡(K−P0P0)t = \frac{1}{r}\ln\left(\frac{K - P_0}{P_0}\right), P=K2P = \frac{K}{2}, max rate =rK4= \frac{rK}{4}

  • The inflection happens at a positive time only when P0<K/2P_0 < K/2. If P0>KP_0 > K there is no inflection point.

Worked example

  • Logistic population: r=0.2r = 0.2, K=1000K = 1000, P0=100P_0 = 100. P(t)=100(1000)e0.2t900+100e0.2t=1000e0.2t9+e0.2tP(t) = \frac{100(1000)e^{0.2t}}{900 + 100e^{0.2t}} = \frac{1000e^{0.2t}}{9 + e^{0.2t}}. Then P(10)=1000e29+e2≈451P(10) = \frac{1000e^2}{9 + e^2} \approx 451. Fastest growth at t=5ln⁡9≈11.0t = 5\ln 9 \approx 11.0, when P=500P = 500.

  • Reading a logistic DE: P′=0.3P−0.0006P2=0.3P(1−P500)P' = 0.3P - 0.0006P^2 = 0.3P\left(1 - \frac{P}{500}\right), so r=0.3r = 0.3 and K=500K = 500. Factor out rPrP to read off KK.

Common mistakes

  • Mixing up KK (the ceiling) and P0P_0 (the start).

  • Thinking the population reaches KK. It only approaches it as t→∞t \to \infty.

  • Using rr as a percent without converting: 12 percent means r=0.12r = 0.12.

How the pieces connect

  • Every problem starts with the same triage question: just integrate (5.1), separable (5.3), logistic (5.4), or only approximate/describe (5.2)?

  • 5.1's "integrate, then use the initial value to find CC" is step 3 and step 5 of the separable recipe in 5.3; separation just adds the step of moving the yy's to the dydy side first.

  • The equilibrium and sign-chart ideas from 5.2 explain the behavior of the exact solutions in 5.3 and 5.4: a mixing tank's u→50u \to 50 and a logistic P→KP \to K are both solutions drifting toward a stable equilibrium.

  • The logistic equation is a separable, autonomous DE, so 5.4 is 5.3's method (with partial fractions) applied to one important model, and its equilibria P=0P = 0 and P=KP = K follow from 5.2's sign chart.

  • Euler's method (5.2) is the fallback when a DE is not separable, such as y′=x+yy' = x + y; it approximates the same solution curve that the direction field sketches.

Checklist

  • Find the order of a DE

  • Verify a function solves a DE / IVP

  • Solve y′=f(x)y' = f(x) with an initial value

  • Velocity and height of a thrown object

  • Compute slopes for a direction field

  • Find equilibria and classify stability

  • Run 3–5 steps of Euler's method

  • Solve a separable DE (general + IVP)

  • Set up and solve a mixing problem

  • Newton's cooling: find kk, then a time

  • Write and solve a logistic IVP

  • Find the logistic inflection point