Skip to content
The site is in test mode. All features are free for now.
MathAgora

University Mathematics · Calculus

Differential equations

Modeling with differential equations, direction fields and Euler's method, separable equations, population growth models, linear equations and predator-prey systems.

90 min 10 questions

§9.1Modeling with differential equations

A differential equation contains an unknown function and its derivatives; its order is that of the highest derivative. A function y=f(x)y = f(x) is a solution if it satisfies the equation identically. The general solution contains constants; an initial condition y(x0)=y0y(x_0) = y_0 picks out one solution (an initial-value problem).

Examples: dPdt=kP\frac{dP}{dt} = kP (growth), dPdt=kP(1−PM)\frac{dP}{dt} = kP\left(1 - \frac PM\right) (logistic growth), md2xdt2=−kxm\frac{d^2x}{dt^2} = -kx (a vibrating spring).

§9.2Direction fields and Euler's method

For y′=F(x,y)y' = F(x, y), draw at each point (x,y)(x, y) a short segment with slope F(x,y)F(x, y) — the direction field. Solution curves follow these segments.

Euler's method (step size hh): xn=xn−1+h,yn=yn−1+h F(xn−1,yn−1)x_n = x_{n-1} + h,\qquad y_n = y_{n-1} + h\,F(x_{n-1}, y_{n-1}) i.e., at each step move a short distance along the tangent line. Smaller steps give better approximations.

§9.3Separable equations

An equation dydx=g(x)f(y)\frac{dy}{dx} = g(x)f(y) is separable. Separate the variables and integrate both sides: ∫dyf(y)=∫g(x) dx\int\frac{dy}{f(y)} = \int g(x)\,dx The result is often implicit; solve for yy if possible. Check separately the values with f(y)=0f(y) = 0 (constant solutions). Applications: mixing problems, orthogonal trajectories.

§9.4Models for population growth

Exponential growth: dPdt=kP⇒P=P0ekt\frac{dP}{dt} = kP \Rightarrow P = P_0e^{kt} — unlimited growth.

Logistic model: dPdt=kP(1−PM)\frac{dP}{dt} = kP\left(1 - \frac PM\right), where MM is the carrying capacity. The equilibrium solutions are P=0P = 0 and P=MP = M; if 0<P0<M0 < P_0 < M the population increases toward MM. Explicit solution: P(t)=M1+Ae−kt,A=M−P0P0P(t) = \frac{M}{1 + Ae^{-kt}},\qquad A = \frac{M - P_0}{P_0}

§9.5Linear equations

A first-order linear equation: y′+P(x)y=Q(x)y' + P(x)y = Q(x). Multiply by the integrating factor I(x)=e∫P(x) dxI(x) = e^{\int P(x)\,dx}; the left side becomes (Iy)′(I y)', so y=1I(x)[∫I(x)Q(x) dx+C]y = \frac{1}{I(x)}\left[\int I(x)Q(x)\,dx + C\right] Application: electric circuits (LdIdt+RI=E(t)L\frac{dI}{dt} + RI = E(t)).

§9.6Predator-prey systems

Lotka-Volterra equations: prey RR (e.g. rabbits) and predators WW (wolves): dRdt=kR−aRW,dWdt=−rW+bRW\frac{dR}{dt} = kR - aRW,\qquad \frac{dW}{dt} = -rW + bRW Without predators the prey grows exponentially; without prey the predators die out. The nonzero equilibrium is R=rbR = \frac rb, W=kaW = \frac ka. In the phase plane (R,W)(R, W) the trajectories are closed curves — the populations cycle.

Key formulas

  • Euler's method (§9.2)

    yn=yn−1+h F(xn−1,yn−1)y_n=y_{n-1}+h\,F(x_{n-1},y_{n-1})
  • Separable equation (§9.3)

    ∫dyf(y)=∫g(x) dx\int\dfrac{dy}{f(y)}=\int g(x)\,dx
  • Logistic solution (§9.4)

    P(t)=M1+Ae−kt,A=M−P0P0P(t)=\dfrac{M}{1+Ae^{-kt}},\quad A=\dfrac{M-P_0}{P_0}
  • Linear equation (§9.5)

    y′+P(x)y=Q(x),I(x)=e∫P dxy'+P(x)y=Q(x),\quad I(x)=e^{\int P\,dx}
  • Lotka-Volterra (§9.6)

    R′=kR−aRW,W′=−rW+bRWR'=kR-aRW,\quad W'=-rW+bRW

Worked examples

Example 1

Solve dydx=x2y2\dfrac{dy}{dx} = \dfrac{x^2}{y^2}, y(0)=2y(0) = 2.

Example 2

Solve y′+yx=2y' + \dfrac{y}{x} = 2, x>0x > 0.