Skip to content

FP2 Chapter 5: First-Order Differential Equations

FP2 Lecture Notes: First-Order Ordinary Differential Equations

Section titled “FP2 Lecture Notes: First-Order Ordinary Differential Equations”

First order ordinary differential equations (ODEs) are fundamental in mathematical modeling of real-world phenomena. These equations describe relationships involving an unknown function and its first derivative. We’ll explore various techniques for solving these equations, with a particular focus on linear equations and integrating factors.

Module 1: Separable Differential Equations (Review)

Section titled “Module 1: Separable Differential Equations (Review)”

Separable Differential Equation. A differential equation is separable if it can be written in the form:

dydx=f(x)g(y)\frac{dy}{dx} = \frac{f(x)}{g(y)}

or equivalently:

g(y)dydx=f(x)g(y)\frac{dy}{dx} = f(x)

Linear First Order ODE. A first order differential equation is linear if it can be written in the form:

dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x)

where P(x)P(x) and Q(x)Q(x) are functions of xx only.

Solve dydx+y=ex\frac{dy}{dx} + y = e^x.

Solution:

  1. Identify: P(x)=1P(x) = 1 and Q(x)=exQ(x) = e^x

  2. Find the integrating factor:

μ(x)=e1dx=ex\mu(x) = e^{\int 1\,dx} = e^x
  1. Multiply the equation by μ(x)\mu(x):
exdydx+exy=exex=e2xe^x\frac{dy}{dx} + e^x \cdot y = e^x \cdot e^x = e^{2x}
  1. Left side is a derivative:
ddx[exy]=e2x\frac{d}{dx}[e^x y] = e^{2x}
  1. Integrate both sides:
exy=e2xdx=12e2x+Ce^x y = \int e^{2x}\,dx = \frac{1}{2}e^{2x} + C
  1. Solve for yy:
y=1ex[12e2x+C]=12ex+Cexy = \frac{1}{e^x}\left[\frac{1}{2}e^{2x} + C\right] = \frac{1}{2}e^x + Ce^{-x}

Check: Verify by substituting back:

dydx+y=(12exCex)+(12ex+Cex)=ex\frac{dy}{dx} + y = \left(\frac{1}{2}e^x - Ce^{-x}\right) + \left(\frac{1}{2}e^x + Ce^{-x}\right) = e^x \quad \checkmark

Example 2: Linear ODE with Initial Condition

Section titled “Example 2: Linear ODE with Initial Condition”

Solve the initial value problem: dydx1xy=x2\frac{dy}{dx} - \frac{1}{x}y = x^2 with y(1)=2y(1) = 2 for x>0x > 0.

Solution:

  1. Identify: P(x)=1xP(x) = -\frac{1}{x} and Q(x)=x2Q(x) = x^2

  2. Find the integrating factor:

μ(x)=e1xdx=elnx=1xfor x>0\mu(x) = e^{\int -\frac{1}{x}\,dx} = e^{-\ln|x|} = \frac{1}{x} \quad \text{for } x > 0
  1. Multiply the equation by μ(x)\mu(x):
1xdydx1x2y=x\frac{1}{x}\frac{dy}{dx} - \frac{1}{x^2}y = x
  1. Recognize the left side as a derivative:
ddx[yx]=x\frac{d}{dx}\left[\frac{y}{x}\right] = x
  1. Integrate both sides:
yx=xdx=x22+C\frac{y}{x} = \int x\,dx = \frac{x^2}{2} + C
  1. Solve for yy:
y=x32+Cxy = \frac{x^3}{2} + Cx
  1. Apply the initial condition y(1)=2y(1) = 2:
2=12+C    C=322 = \frac{1}{2} + C \implies C = \frac{3}{2}
  1. Final solution:
y=x32+3x2y = \frac{x^3}{2} + \frac{3x}{2}

Note: The solution represents the family of curves y=x32+Cxy = \frac{x^3}{2} + Cx. The initial condition y(1)=2y(1) = 2 selects the specific curve where C=32C = \frac{3}{2}.

Example 3: Substitution u=y+2xu = y + 2x

Section titled “Example 3: Substitution u=y+2xu = y + 2xu=y+2x”

a. Use the substitution u=y+2xu = y + 2x to transform the differential equation

dydx=(1+2y+4x)1+y+2x\frac{dy}{dx} = \frac{-(1 + 2y + 4x)}{1 + y + 2x}

into a differential equation in uu and xx.

b. By first solving this new equation, show that the general solution to the original equation may be written as 4x2+4xy+y2+2y+2x=k4x^2 + 4xy + y^2 + 2y + 2x = k, where kk is a constant.

Solution:

Part (a):

Given the substitution u=y+2xu = y + 2x, we need to express dydx\frac{dy}{dx} in terms of uu and xx.

Rearranging: y=u2xy = u - 2x, so by the chain rule:

dydx=dudx2\frac{dy}{dx} = \frac{du}{dx} - 2

Substitute y=u2xy = u - 2x into the right side:

(1+2(u2x)+4x)1+(u2x)+2x=(1+2u)1+u\frac{-(1 + 2(u - 2x) + 4x)}{1 + (u - 2x) + 2x} = \frac{-(1 + 2u)}{1 + u}

So the equation becomes:

dudx2=(1+2u)1+u\frac{du}{dx} - 2 = \frac{-(1 + 2u)}{1 + u}

Rearranging:

dudx=(1+2u)+2(1+u)1+u=11+u\frac{du}{dx} = \frac{-(1 + 2u) + 2(1 + u)}{1 + u} = \frac{1}{1 + u}

Part (b):

Solve the transformed equation dudx=11+u\frac{du}{dx} = \frac{1}{1 + u}, which is separable:

(1+u)du=dx(1 + u)\,du = dx

Integrating both sides:

u+u22=x+C1u + \frac{u^2}{2} = x + C_1

Substitute back u=y+2xu = y + 2x:

(y+2x)+(y+2x)22=x+C1(y + 2x) + \frac{(y + 2x)^2}{2} = x + C_1

Expanding and simplifying, setting k=2C1k = 2C_1:

4x2+4xy+y2+2y+2x=k4x^2 + 4xy + y^2 + 2y + 2x = k

Example 4: Substitution z=y1z = y^{-1}

Section titled “Example 4: Substitution z=y−1z = y^{-1}z=y−1”

a. Use the substitution z=y1z = y^{-1} to transform the differential equation

dydx1xy=(x+1)3xy2\frac{dy}{dx} - \frac{1}{x}y = \frac{(x + 1)^3}{x}y^2

into the differential equation

dzdx+1xz=(x+1)3x\frac{dz}{dx} + \frac{1}{x}z = -\frac{(x + 1)^3}{x}

b. By first solving the transformed equation, find the general solution to the original equation, giving yy in terms of xx.

Solution:

Part (a):

Given z=y1z = y^{-1}, we have y=z1y = z^{-1}. Using the chain rule:

dydx=z2dzdx=1z2dzdx\frac{dy}{dx} = -z^{-2}\frac{dz}{dx} = -\frac{1}{z^2}\frac{dz}{dx}

Substituting y=z1y = z^{-1} into the original equation:

1z2dzdx1x1z=(x+1)3x1z2-\frac{1}{z^2}\frac{dz}{dx} - \frac{1}{x}\frac{1}{z} = \frac{(x + 1)^3}{x}\frac{1}{z^2}

Multiply both sides by z2-z^2:

dzdx+1xz=(x+1)3x\frac{dz}{dx} + \frac{1}{x}z = -\frac{(x + 1)^3}{x} \quad \checkmark

Part (b):

This is a linear first order ODE with P(x)=1xP(x) = \frac{1}{x} and Q(x)=(x+1)3xQ(x) = -\frac{(x + 1)^3}{x}.

Find the integrating factor:

μ(x)=e1xdx=elnx=x(for x>0)\mu(x) = e^{\int \frac{1}{x}\,dx} = e^{\ln|x|} = x \quad (\text{for } x > 0)

Multiply by μ(x)\mu(x):

ddx(xz)=(x+1)3\frac{d}{dx}(xz) = -(x + 1)^3

Integrate both sides:

xz=(x+1)44+Cxz = -\frac{(x+1)^4}{4} + C

Since z=y1z = y^{-1}:

xy=(x+1)44+C\frac{x}{y} = -\frac{(x+1)^4}{4} + C y=4x4C(x+1)4y = \frac{4x}{4C - (x + 1)^4}

Solve the differential equation:

sinxdydxycosx=sin2xsinx\sin x \frac{dy}{dx} - y\cos x = \sin 2x \sin x

Consider the differential equation:

dydx4ytanx=2y12\frac{dy}{dx} - 4y\tan x = 2y^{\frac{1}{2}}

(a) Show that the substitution z=y12z = y^{\frac{1}{2}} transforms this equation into:

dzdx2ztanx=1\frac{dz}{dx} - 2z\tan x = 1

(b) Solve the transformed equation to find zz as a function of xx.

(c) Hence obtain the general solution of the original equation.

(a) Find, in the form y=f(x)y = f(x), the general solution of the equation:

dydx+2ytanx=sin2x,0<x<π2\frac{dy}{dx} + 2y\tan x = \sin 2x, \quad 0 < x < \frac{\pi}{2}

given that y=2y = 2 at x=π3x = \frac{\pi}{3}.

(b) Find the value of yy at x=π6x = \frac{\pi}{6}, giving your answer in the form a+klnba + k\ln b, where aa and bb are integers and kk is rational.

Consider the differential equation:

xdydx+2y=4x2x\frac{dy}{dx} + 2y = 4x^2

(1) Find the general solution of this differential equation.

(2) Find the particular solution for which y=5y = 5 at x=1x = 1, giving your answer in the form y=f(x)y = f(x).

(3) For this particular solution:

(a) Find the exact values of the coordinates of the turning points of the curve.

(b) Sketch the curve, showing the coordinates of the turning points.