1. Home
  2. Explore
  3. Mathematics
  4. Differential Equations Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Differential Equations Overview

Differential Equations Course Review — Part 1

Basics of Differential Equations

A differential equation is an equation that contains at least one derivative. The independent variable is the variable with respect to which differentiation occurs; the dependent variable is the one being differentiated.

  • Ordinary differential equation (ODE): Only one independent variable. Example: dydx+x=y\frac{dy}{dx} + x = ydxdy​+x=y (here xxx is independent, yyy is dependent).

  • Partial differential equation (PDE): More than one independent variable. Example: ∂2u∂x2+∂u∂t=0\frac{\partial^2 u}{\partial x^2} + \frac{\partial u}{\partial t} = 0∂x2∂2u​+∂t∂u​=0.

Initial Value Problem (IVP)

An IVP consists of a differential equation plus initial condition(s) given at a single point (usually t=0t=0t=0). The number of initial conditions needed equals the order of the equation.

  • First order: one initial condition, e.g., y(0)=y0y(0)=y_0y(0)=y0​.

  • Second order: two initial conditions, e.g., y(0)=y0y(0)=y_0y(0)=y0​, y′(0)=y1y'(0)=y_1y′(0)=y1​.

Boundary Value Problem (BVP)

A BVP gives conditions at two different points, e.g., y(a)=cy(a)=cy(a)=c, y(b)=dy(b)=dy(b)=d. The number of conditions still matches the order.

Verifying Solutions

To verify that a given function is a solution to a differential equation, substitute the function and its derivatives into the equation and simplify to see if it satisfies the equation identically.

Example: Verify that x(t)=c1e−3t+c2e2tx(t) = c_1 e^{-3t} + c_2 e^{2t}x(t)=c1​e−3t+c2​e2t is a solution of x′′+x′−6x=0x'' + x' - 6x = 0x′′+x′−6x=0.

  • Compute derivatives: x′=−3c1e−3t+2c2e2tx' = -3c_1 e^{-3t} + 2c_2 e^{2t}x′=−3c1​e−3t+2c2​e2t, x′′=9c1e−3t+4c2e2tx'' = 9c_1 e^{-3t} + 4c_2 e^{2t}x′′=9c1​e−3t+4c2​e2t.

  • Substitute: (9c1e−3t+4c2e2t)+(−3c1e−3t+2c2e2t)−6(c1e−3t+c2e2t)=0(9c_1 e^{-3t} + 4c_2 e^{2t}) + (-3c_1 e^{-3t} + 2c_2 e^{2t}) - 6(c_1 e^{-3t} + c_2 e^{2t}) = 0(9c1​e−3t+4c2​e2t)+(−3c1​e−3t+2c2​e2t)−6(c1​e−3t+c2​e2t)=0.

  • Simplify: All terms cancel, yielding 0=00 = 00=0, so it is a solution.

If initial conditions are given, the constants c1,c2c_1, c_2c1​,c2​ can be determined by solving a system of equations.

Example: For the same equation with x(0)=0x(0)=0x(0)=0, x′(0)=−10x'(0)=-10x′(0)=−10, solve:

c1+c2=0c_1 + c_2 = 0c1​+c2​=0, −3c1+2c2=−10-3c_1 + 2c_2 = -10−3c1​+2c2​=−10.

Using elimination: multiply first eq by 3 and add to second: 5c2=−10⇒c2=−25c_2 = -10 \Rightarrow c_2 = -25c2​=−10⇒c2​=−2, then c1=2c_1 = 2c1​=2. So x(t)=2e−3t−2e2tx(t) = 2e^{-3t} - 2e^{2t}x(t)=2e−3t−2e2t.


Four Fundamental Models

1. Exponential Growth

  • DE: dydt=ky\frac{dy}{dt} = k ydtdy​=ky with k>0k>0k>0.

  • Solution: y(t)=aekty(t) = a e^{kt}y(t)=aekt.

  • Graph: starts at aaa, increases without bound.

2. Exponential Decay

  • DE: dydt=−ky\frac{dy}{dt} = -k ydtdy​=−ky with k>0k>0k>0.

  • Solution: y(t)=ae−kty(t) = a e^{-kt}y(t)=ae−kt.

  • Graph: starts at aaa, decays to zero.

3. Simple Harmonic Motion (SHM)

  • DE: d2ydt2=−k2y\frac{d^2 y}{dt^2} = -k^2 ydt2d2y​=−k2y (or y′′+k2y=0y'' + k^2 y = 0y′′+k2y=0).

  • Solution: y(t)=Acos⁡(kt)+Bsin⁡(kt)y(t) = A \cos(kt) + B \sin(kt)y(t)=Acos(kt)+Bsin(kt).

  • Graph: periodic oscillation.

4. Hybrid Model (Exponential Growth + Decay)

  • DE: d2ydt2=k2y\frac{d^2 y}{dt^2} = k^2 ydt2d2y​=k2y (or y′′−k2y=0y'' - k^2 y = 0y′′−k2y=0).

  • Solutions: either y=Acosh⁡(kt)+Bsinh⁡(kt)y = A \cosh(kt) + B \sinh(kt)y=Acosh(kt)+Bsinh(kt) or y=Cekt+De−kty = C e^{kt} + D e^{-kt}y=Cekt+De−kt.

  • Graph: combines exponential growth and decay (e.g., hanging cable).

Application: Recognizing these forms allows direct writing of general solutions.


Classification of Differential Equations

Ordinary vs. Partial

  • ODE: one independent variable.

  • PDE: more than one independent variable.

Order

The order is the highest derivative appearing. Example: y′′+xy′=3y'' + x y' = 3y′′+xy′=3 is second order.

Linear vs. Nonlinear

  • Linear: no powers other than 1 of the dependent variable or its derivatives, and no products of them. Example: dxdt+t3x=t\frac{dx}{dt} + t^3 x = tdtdx​+t3x=t is linear.

  • Nonlinear: violates linearity, e.g., xdxdt+t3x=tx \frac{dx}{dt} + t^3 x = txdtdx​+t3x=t is nonlinear.

Constant Coefficient

All coefficients are constants. Example: 5x′′−3x′+x=05x'' - 3x' + x = 05x′′−3x′+x=0 has constant coefficients; solved via characteristic equation in λ\lambdaλ.

Homogeneous vs. Nonhomogeneous

  • Homogeneous: the equation equals zero (or has no term depending solely on the independent variable). Example: y′′+y=0y'' + y = 0y′′+y=0.

  • Nonhomogeneous: there is a nonzero function of the independent variable alone. Example: y′′+y=ty'' + y = ty′′+y=t.

Autonomous

The differential equation does not depend explicitly on the independent variable. Example: dxdt+x2=3\frac{dx}{dt} + x^2 = 3dtdx​+x2=3 is autonomous.

System of ODEs

Multiple equations involving more than one dependent variable. Example: x′=2y+etx' = 2y + e^tx′=2y+et, y′=3x+ysin⁡ty' = 3x + y \sin ty′=3x+ysint.


Basic Integration

Type 1: Derivative is a function of the independent variable only

dydx=f(x)⇒y=∫f(x) dx.\frac{dy}{dx} = f(x) \quad \Rightarrow \quad y = \int f(x)\, dx.dxdy​=f(x)⇒y=∫f(x)dx.

Example: dydx=3cos⁡2x−8e−4x+5\frac{dy}{dx} = 3\cos 2x - 8e^{-4x} + 5dxdy​=3cos2x−8e−4x+5, with y(0)=−3y(0) = -3y(0)=−3.

Integrate: y=32sin⁡2x+2e−4x+5x+Cy = \frac{3}{2}\sin 2x + 2e^{-4x} + 5x + Cy=23​sin2x+2e−4x+5x+C. Using y(0)=−3y(0) = -3y(0)=−3 gives C=−5C = -5C=−5, so y=32sin⁡2x+2e−4x+5x−5y = \frac{3}{2}\sin 2x + 2e^{-4x} + 5x -5y=23​sin2x+2e−4x+5x−5.

Type 2: Derivative is a function of the dependent variable only

dydx=g(y).\frac{dy}{dx} = g(y).dxdy​=g(y).

Method: Flip the equation: dxdy=1g(y)\frac{dx}{dy} = \frac{1}{g(y)}dydx​=g(y)1​, then integrate with respect to yyy: x=∫1g(y) dyx = \int \frac{1}{g(y)}\, dyx=∫g(y)1​dy.

Example: dydx=y+3\frac{dy}{dx} = y+3dxdy​=y+3, with y(1)=−2y(1) = -2y(1)=−2.

Flip to dxdy=1y+3\frac{dx}{dy} = \frac{1}{y+3}dydx​=y+31​, integrate: x=ln⁡∣y+3∣+Cx = \ln|y+3| + Cx=ln∣y+3∣+C. Solve for yyy: y=Ce−x−3y = C e^{-x} -3y=Ce−x−3. Use initial condition: −2=Ce−1−3⇒C=e-2 = C e^{-1} -3 \Rightarrow C = e−2=Ce−1−3⇒C=e, so y=e1−x−3y = e^{1-x} - 3y=e1−x−3.


Separable Differential Equations

A separable equation can be written as dydx=f(x)g(y)\frac{dy}{dx} = f(x) g(y)dxdy​=f(x)g(y). Separate variables and integrate:

dyg(y)=f(x) dx⇒∫dyg(y)=∫f(x) dx.\frac{dy}{g(y)} = f(x)\, dx \quad \Rightarrow \quad \int \frac{dy}{g(y)} = \int f(x)\, dx.g(y)dy​=f(x)dx⇒∫g(y)dy​=∫f(x)dx.

Example 1: dydx=y(1−4x)\frac{dy}{dx} = y(1-4x)dxdy​=y(1−4x), y(0)=ey(0)= ey(0)=e.

Separate: dyy=(1−4x) dx\frac{dy}{y} = (1-4x)\, dxydy​=(1−4x)dx. Integrate: ln⁡∣y∣=x−2x2+C\ln|y| = x - 2x^2 + Cln∣y∣=x−2x2+C ⇒\Rightarrow⇒ y=Aex−2x2y = A e^{x-2x^2}y=Aex−2x2. Using y(0)=ey(0)=ey(0)=e gives A=eA = eA=e, so y=ex−2x2+1y = e^{x-2x^2+1}y=ex−2x2+1.

Example 2: xdxdt=3et−xx \frac{dx}{dt} = 3e^{t-x}xdtdx​=3et−x (implicit solution).

Rewrite as xexdx=3etdtx e^x dx = 3e^t dtxexdx=3etdt. Integrate left by parts: ∫xexdx=xex−ex\int x e^x dx = x e^x - e^x∫xexdx=xex−ex. So xex−ex=3et+Cx e^x - e^x = 3e^t + Cxex−ex=3et+C. Cannot solve for xxx explicitly; this is an implicit solution.


First-Order Linear Differential Equations (Integrating Factor)

Standard form: dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x) y = Q(x)dxdy​+P(x)y=Q(x).

Method:

  1. Find integrating factor I(x)=e∫P(x) dxI(x) = e^{\int P(x)\, dx}I(x)=e∫P(x)dx.

  2. Multiply the whole equation by III: dydxI+PIy=QI\frac{dy}{dx} I + P I y = Q Idxdy​I+PIy=QI.

  3. The left side becomes ddx(yI)\frac{d}{dx}(y I)dxd​(yI).

  4. Integrate: yI=∫QI dx+Cy I = \int Q I\, dx + CyI=∫QIdx+C.

  5. Solve for yyy: y=1I(∫QI dx+C)y = \frac{1}{I} \left( \int Q I\, dx + C \right)y=I1​(∫QIdx+C).

Example 1: dydx−3y=e3xsin⁡4x\frac{dy}{dx} - 3y = e^{3x} \sin 4xdxdy​−3y=e3xsin4x, y(0)=−14y(0)= -\frac14y(0)=−41​.

  • P=−3P=-3P=−3, I=e∫−3dx=e−3xI = e^{\int -3 dx} = e^{-3x}I=e∫−3dx=e−3x.

  • Multiply: e−3xdydx−3e−3xy=sin⁡4xe^{-3x} \frac{dy}{dx} - 3 e^{-3x} y = \sin 4xe−3xdxdy​−3e−3xy=sin4x ⇒\Rightarrow⇒ ddx(ye−3x)=sin⁡4x\frac{d}{dx}(y e^{-3x}) = \sin 4xdxd​(ye−3x)=sin4x.

  • Integrate: ye−3x=−14cos⁡4x+Cy e^{-3x} = -\frac14 \cos 4x + Cye−3x=−41​cos4x+C.

  • Multiply by e3xe^{3x}e3x: y=−14e3xcos⁡4x+Ce3xy = -\frac14 e^{3x} \cos 4x + C e^{3x}y=−41​e3xcos4x+Ce3x.

  • Use y(0)=−14y(0)=-\frac14y(0)=−41​: −14=−14⋅1+C⇒C=0-\frac14 = -\frac14 \cdot 1 + C \Rightarrow C = 0−41​=−41​⋅1+C⇒C=0, so y=−14e3xcos⁡4xy = -\frac14 e^{3x} \cos 4xy=−41​e3xcos4x.

Example 2: tdydt−2y=t3e−2tt \frac{dy}{dt} - 2y = t^3 e^{-2t}tdtdy​−2y=t3e−2t (not in standard form).
Divide by ttt: dydt−2ty=t2e−2t\frac{dy}{dt} - \frac{2}{t} y = t^2 e^{-2t}dtdy​−t2​y=t2e−2t.

  • P(t)=−2tP(t)= -\frac{2}{t}P(t)=−t2​, I=e∫−2tdt=e−2ln⁡t=t−2I = e^{\int -\frac{2}{t} dt} = e^{-2\ln t} = t^{-2}I=e∫−t2​dt=e−2lnt=t−2.

  • Multiply: t−2dydt−2t3y=e−2tt^{-2} \frac{dy}{dt} - \frac{2}{t^3} y = e^{-2t}t−2dtdy​−t32​y=e−2t ⇒\Rightarrow⇒ ddt(yt−2)=e−2t\frac{d}{dt}(y t^{-2}) = e^{-2t}dtd​(yt−2)=e−2t.

  • Integrate: yt−2=−12e−2t+Cy t^{-2} = -\frac12 e^{-2t} + Cyt−2=−21​e−2t+C ⇒\Rightarrow⇒ y=−12t2e−2t+Ct2y = -\frac12 t^2 e^{-2t} + C t^2y=−21​t2e−2t+Ct2.


Substitution Methods

1. Direct Substitution

Used when the DE contains a "inside" function. Let uuu equal that inside function, rewrite the DE in terms of uuu, solve, then back‑substitute.

Example: dydx=(y+4x−3)2\frac{dy}{dx} = (y+4x-3)^2dxdy​=(y+4x−3)2, y(0)=4y(0)=4y(0)=4.

  • Let u=y+4x−3u = y+4x-3u=y+4x−3 ⇒\Rightarrow⇒ dudx=dydx+4\frac{du}{dx} = \frac{dy}{dx} + 4dxdu​=dxdy​+4.

  • Then dydx=dudx−4\frac{dy}{dx} = \frac{du}{dx} - 4dxdy​=dxdu​−4. Substituting: dudx−4=u2\frac{du}{dx} - 4 = u^2dxdu​−4=u2 ⇒\Rightarrow⇒ dudx=u2+4\frac{du}{dx} = u^2 + 4dxdu​=u2+4.

  • Separate: duu2+4=dx\frac{du}{u^2+4} = dxu2+4du​=dx. Integrate: 12tan⁡−1(u2)=x+C\frac12 \tan^{-1}\left(\frac{u}{2}\right) = x + C21​tan−1(2u​)=x+C.

  • So u=2tan⁡(2x+2C)u = 2 \tan(2x + 2C)u=2tan(2x+2C). Back‑substitute: y=2tan⁡(2x+2C)−4x+3y = 2\tan(2x + 2C) - 4x + 3y=2tan(2x+2C)−4x+3. Use y(0)=4y(0)=4y(0)=4 to find CCC: 4=2tan⁡(2C)+34 = 2\tan(2C) + 34=2tan(2C)+3 ⇒\Rightarrow⇒ tan⁡(2C)=12\tan(2C) = \frac12tan(2C)=21​ ⇒\Rightarrow⇒ 2C=tan⁡−1(12)+kπ2C = \tan^{-1}\left(\frac12\right) + k\pi2C=tan−1(21​)+kπ. So y=2tan⁡(2x+tan⁡−112+kπ)−4x+3y = 2\tan\left(2x + \tan^{-1}\frac12 + k\pi\right) - 4x + 3y=2tan(2x+tan−121​+kπ)−4x+3.

2. Homogeneous Equations (second meaning)

An equation is homogeneous if it can be written as dydx=F(yx)\frac{dy}{dx} = F\left(\frac{y}{x}\right)dxdy​=F(xy​). Substitute v=yxv = \frac{y}{x}v=xy​, so y=vxy = vxy=vx and dydx=v+xdvdx\frac{dy}{dx} = v + x \frac{dv}{dx}dxdy​=v+xdxdv​. The DE becomes separable in vvv and xxx.

Example: xydydx=x2+y2xy \frac{dy}{dx} = x^2 + y^2xydxdy​=x2+y2, y(1)=2y(1)=\sqrt{2}y(1)=2​.

  • Rewrite: dydx=x2+y2xy=xy+yx=1v+v\frac{dy}{dx} = \frac{x^2+y^2}{xy} = \frac{x}{y} + \frac{y}{x} = \frac{1}{v} + vdxdy​=xyx2+y2​=yx​+xy​=v1​+v where v=y/xv = y/xv=y/x.

  • Substitute: v+xdvdx=1v+vv + x \frac{dv}{dx} = \frac{1}{v} + vv+xdxdv​=v1​+v ⇒\Rightarrow⇒ xdvdx=1vx \frac{dv}{dx} = \frac{1}{v}xdxdv​=v1​.

  • Separate: v dv=1x dxv\, dv = \frac{1}{x}\, dxvdv=x1​dx ⇒\Rightarrow⇒ v22=ln⁡∣x∣+C\frac{v^2}{2} = \ln|x| + C2v2​=ln∣x∣+C.

  • Back‑substitute v=y/xv = y/xv=y/x: y22x2=ln⁡∣x∣+C\frac{y^2}{2x^2} = \ln|x| + C2x2y2​=ln∣x∣+C ⇒\Rightarrow⇒ y2=2x2ln⁡∣x∣+2Cx2y^2 = 2x^2 \ln|x| + 2C x^2y2=2x2ln∣x∣+2Cx2.

  • Use y(1)=2y(1)=\sqrt{2}y(1)=2​: 2=0+2C2 = 0 + 2C2=0+2C ⇒\Rightarrow⇒ C=1C=1C=1, so y2=2x2(ln⁡∣x∣+1)y^2 = 2x^2(\ln|x| + 1)y2=2x2(ln∣x∣+1). Take positive root: y=x2(ln⁡x+1)y = x\sqrt{2(\ln x+1)}y=x2(lnx+1)​ (since x>0x>0x>0 and y(1)>0y(1)>0y(1)>0).

3. Bernoulli Equation

Bernoulli equation: dydx+P(x)y=Q(x)yn\frac{dy}{dx} + P(x) y = Q(x) y^ndxdy​+P(x)y=Q(x)yn, where n≠0,1n \neq 0,1n=0,1.

Method:

  • Divide by yny^nyn: y−ndydx+Py1−n=Qy^{-n} \frac{dy}{dx} + P y^{1-n} = Qy−ndxdy​+Py1−n=Q.

  • Let v=y1−nv = y^{1-n}v=y1−n ⇒\Rightarrow⇒ dvdx=(1−n)y−ndydx\frac{dv}{dx} = (1-n) y^{-n} \frac{dy}{dx}dxdv​=(1−n)y−ndxdy​.

  • Substituting yields a linear first‑order DE in vvv: dvdx+(1−n)Pv=(1−n)Q\frac{dv}{dx} + (1-n) P v = (1-n) Qdxdv​+(1−n)Pv=(1−n)Q.

  • Solve for vvv using integrating factor, then y=v1/(1−n)y = v^{1/(1-n)}y=v1/(1−n).

Example: 2xdydx−y=6x2y32x \frac{dy}{dx} - y = 6x^2 y^32xdxdy​−y=6x2y3 (Bernoulli with n=3n=3n=3).

  • Divide by 2x2x2x: dydx−12xy=3xy3\frac{dy}{dx} - \frac{1}{2x} y = 3x y^3dxdy​−2x1​y=3xy3. Here P=−12xP = -\frac{1}{2x}P=−2x1​, Q=3xQ = 3xQ=3x, n=3n=3n=3.

  • Divide by y3y^3y3: y−3dydx−12xy−2=3xy^{-3} \frac{dy}{dx} - \frac{1}{2x} y^{-2} = 3xy−3dxdy​−2x1​y−2=3x.

  • Set v=y−2v = y^{-2}v=y−2 ⇒\Rightarrow⇒ dvdx=−2y−3dydx\frac{dv}{dx} = -2 y^{-3} \frac{dy}{dx}dxdv​=−2y−3dxdy​. Substituting: −12dvdx−12xv=3x-\frac12 \frac{dv}{dx} - \frac{1}{2x} v = 3x−21​dxdv​−2x1​v=3x ⇒\Rightarrow⇒ dvdx+1xv=−6x\frac{dv}{dx} + \frac{1}{x} v = -6xdxdv​+x1​v=−6x.

  • Linear in vvv: I=e∫1xdx=xI = e^{\int \frac{1}{x} dx} = xI=e∫x1​dx=x. Multiply: xdvdx+v=−6x2x \frac{dv}{dx} + v = -6x^2xdxdv​+v=−6x2 ⇒\Rightarrow⇒ ddx(xv)=−6x2\frac{d}{dx}(x v) = -6x^2dxd​(xv)=−6x2.

  • Integrate: xv=−2x3+Cx v = -2x^3 + Cxv=−2x3+C ⇒\Rightarrow⇒ v=−2x2+Cxv = -2x^2 + \frac{C}{x}v=−2x2+xC​.

  • Since v=y−2v = y^{-2}v=y−2, y−2=−2x2+Cxy^{-2} = -2x^2 + \frac{C}{x}y−2=−2x2+xC​ ⇒\Rightarrow⇒ y2=xC−2x3y^2 = \frac{x}{C - 2x^3}y2=C−2x3x​ ⇒\Rightarrow⇒ y=±xC−2x3y = \pm \sqrt{\frac{x}{C - 2x^3}}y=±C−2x3x​​.


Exact Differential Equations

A first‑order DE in the form M(x,y) dx+N(x,y) dy=0M(x,y)\, dx + N(x,y)\, dy = 0M(x,y)dx+N(x,y)dy=0 is exact if ∂M∂y=∂N∂x\frac{\partial M}{\partial y} = \frac{\partial N}{\partial x}∂y∂M​=∂x∂N​. If exact, there exists a function F(x,y)F(x,y)F(x,y) such that dF=Mdx+NdydF = M dx + N dydF=Mdx+Ndy, and the general solution is F(x,y)=CF(x,y) = CF(x,y)=C.

Method:

  1. Check exactness.

  2. Find FFF by integrating MMM with respect to xxx: F=∫M dx+g(y)F = \int M\, dx + g(y)F=∫Mdx+g(y).

  3. Differentiate FFF with respect to yyy and set equal to NNN to solve for g′(y)g'(y)g′(y); integrate to get g(y)g(y)g(y).

  4. (Shortcut) Alternatively, integrate MMM w.r.t xxx and NNN w.r.t yyy separately, then combine: write common terms once and uncommon terms from each.

Example: (3ex−y2) dx+(3−2xy+sin⁡y) dy=0(3e^x - y^2)\, dx + (3 - 2xy + \sin y)\, dy = 0(3ex−y2)dx+(3−2xy+siny)dy=0.

  • M=3ex−y2M = 3e^x - y^2M=3ex−y2, N=3−2xy+sin⁡yN = 3 - 2xy + \sin yN=3−2xy+siny.

  • ∂M∂y=−2y\frac{\partial M}{\partial y} = -2y∂y∂M​=−2y, ∂N∂x=−2y\frac{\partial N}{\partial x} = -2y∂x∂N​=−2y → exact.

  • Integrate MMM w.r.t xxx: F=3ex−xy2+g(y)F = 3e^x - x y^2 + g(y)F=3ex−xy2+g(y).

  • ∂F∂y=−2xy+g′(y)\frac{\partial F}{\partial y} = -2xy + g'(y)∂y∂F​=−2xy+g′(y). Set equal to NNN: −2xy+g′(y)=3−2xy+sin⁡y-2xy + g'(y) = 3 - 2xy + \sin y−2xy+g′(y)=3−2xy+siny ⇒\Rightarrow⇒ g′(y)=3+sin⁡yg'(y) = 3 + \sin yg′(y)=3+siny.

  • Integrate: g(y)=3y−cos⁡yg(y) = 3y - \cos yg(y)=3y−cosy.

  • Thus F(x,y)=3ex−xy2+3y−cos⁡y=CF(x,y) = 3e^x - x y^2 + 3y - \cos y = CF(x,y)=3ex−xy2+3y−cosy=C. Implicit solution.


Almost Exact Equations (Integrating Factor)

If ∂M∂y≠∂N∂x\frac{\partial M}{\partial y} \neq \frac{\partial N}{\partial x}∂y∂M​=∂x∂N​, the equation may be made exact by multiplying by an integrating factor μ\muμ.

Two common cases:

  • Case 1: If My−NxN\frac{M_y - N_x}{N}NMy​−Nx​​ is a function of xxx only, then μ(x)=e∫My−NxNdx\mu(x) = e^{\int \frac{M_y - N_x}{N} dx}μ(x)=e∫NMy​−Nx​​dx.

  • Case 2: If Nx−MyM\frac{N_x - M_y}{M}MNx​−My​​ is a function of yyy only, then μ(y)=e∫Nx−MyMdy\mu(y) = e^{\int \frac{N_x - M_y}{M} dy}μ(y)=e∫MNx​−My​​dy.

After multiplying by μ\muμ, the equation becomes exact and can be solved as above.

Example: xy dx+(2x2+3y2−1) dy=0xy\, dx + (2x^2 + 3y^2 - 1)\, dy = 0xydx+(2x2+3y2−1)dy=0.

  • M=xyM = xyM=xy, N=2x2+3y2−1N = 2x^2+3y^2-1N=2x2+3y2−1.

  • My=xM_y = xMy​=x, Nx=4xN_x = 4xNx​=4x, not equal.

  • My−NxN=x−4x2x2+3y2−1\frac{M_y - N_x}{N} = \frac{x-4x}{2x^2+3y^2-1}NMy​−Nx​​=2x2+3y2−1x−4x​ not function of xxx alone.

  • Try case 2: Nx−MyM=4x−xxy=3y\frac{N_x - M_y}{M} = \frac{4x - x}{xy} = \frac{3}{y}MNx​−My​​=xy4x−x​=y3​, function of yyy only.

  • μ(y)=e∫3ydy=y3\mu(y) = e^{\int \frac{3}{y} dy} = y^3μ(y)=e∫y3​dy=y3. Multiply the DE by y3y^3y3: xy4 dx+(2x2y3+3y5−y3) dy=0x y^4\, dx + (2x^2 y^3 + 3y^5 - y^3)\, dy = 0xy4dx+(2x2y3+3y5−y3)dy=0. Now exact.

  • Use shortcut: Integrate MMM w.r.t xxx: F=12x2y4+g(y)F = \frac12 x^2 y^4 + g(y)F=21​x2y4+g(y). Integrate NNN w.r.t yyy: F=12x2y4+12y6−14y4F = \frac12 x^2 y^4 + \frac12 y^6 - \frac14 y^4F=21​x2y4+21​y6−41​y4.

  • Common term: 12x2y4\frac12 x^2 y^421​x2y4. Uncommon: 12y6−14y4\frac12 y^6 - \frac14 y^421​y6−41​y4. So F=12x2y4+12y6−14y4=CF = \frac12 x^2 y^4 + \frac12 y^6 - \frac14 y^4 = CF=21​x2y4+21​y6−41​y4=C. Implicit solution.


Numerical Methods

When analytic solutions are not possible, approximate solutions using numerical methods.

Euler's Method

Given dydx=f(x,y)\frac{dy}{dx} = f(x,y)dxdy​=f(x,y) and initial condition (x0,y0)(x_0, y_0)(x0​,y0​), with step size hhh:

xn+1=xn+h,yn+1=yn+hf(xn,yn).x_{n+1} = x_n + h, \quad y_{n+1} = y_n + h f(x_n, y_n).xn+1​=xn​+h,yn+1​=yn​+hf(xn​,yn​).

Example: Approximate y(2)y(2)y(2) for dydx=3y−x\frac{dy}{dx} = 3y - xdxdy​=3y−x, y(0)=−1y(0) = -1y(0)=−1, h=0.5h=0.5h=0.5.

  • f(x,y)=3y−xf(x,y) = 3y - xf(x,y)=3y−x.

  • x0=0,y0=−1x_0=0, y_0=-1x0​=0,y0​=−1.

  • x1=0.5x_1=0.5x1​=0.5, y1=−1+0.5(3⋅(−1)−0)=−2.5y_1 = -1 + 0.5(3\cdot(-1)-0) = -2.5y1​=−1+0.5(3⋅(−1)−0)=−2.5.

  • x2=1.0x_2=1.0x2​=1.0, y2=−2.5+0.5(3⋅(−2.5)−0.5)=−6.5y_2 = -2.5 + 0.5(3\cdot(-2.5)-0.5) = -6.5y2​=−2.5+0.5(3⋅(−2.5)−0.5)=−6.5.

  • x3=1.5x_3=1.5x3​=1.5, y3=−6.5+0.5(3⋅(−6.5)−1.0)=−16.75y_3 = -6.5 + 0.5(3\cdot(-6.5)-1.0) = -16.75y3​=−6.5+0.5(3⋅(−6.5)−1.0)=−16.75.

  • x4=2.0x_4=2.0x4​=2.0, y4=−16.75+0.5(3⋅(−16.75)−1.5)=−42.625y_4 = -16.75 + 0.5(3\cdot(-16.75)-1.5) = -42.625y4​=−16.75+0.5(3⋅(−16.75)−1.5)=−42.625 ≈ −42.6-42.6−42.6.

Runge‑Kutta Method (Fourth Order)

More accurate. For dydx=f(x,y)\frac{dy}{dx} = f(x,y)dxdy​=f(x,y):

k1=f(xn,yn),k2=f(xn+h2,yn+h2k1),k3=f(xn+h2,yn+h2k2),k4=f(xn+h,yn+hk3),yn+1=yn+h6(k1+2k2+2k3+k4).\begin{aligned} k_1 &= f(x_n, y_n), \\ k_2 &= f\left(x_n + \frac{h}{2}, y_n + \frac{h}{2} k_1\right), \\ k_3 &= f\left(x_n + \frac{h}{2}, y_n + \frac{h}{2} k_2\right), \\ k_4 &= f(x_n + h, y_n + h k_3), \\ y_{n+1} &= y_n + \frac{h}{6}(k_1 + 2k_2 + 2k_3 + k_4). \end{aligned}k1​k2​k3​k4​yn+1​​=f(xn​,yn​),=f(xn​+2h​,yn​+2h​k1​),=f(xn​+2h​,yn​+2h​k2​),=f(xn​+h,yn​+hk3​),=yn​+6h​(k1​+2k2​+2k3​+k4​).​

This method is very accurate and is the basis for many ODE solvers (e.g., ode45 in MATLAB).


Direction Fields (Slope Fields)

A direction field is a plot of small line segments at grid points showing the slope dydx=f(x,y)\frac{dy}{dx} = f(x,y)dxdy​=f(x,y). It gives a visual idea of the behavior of solutions without solving.

Example: dydx=2x−y\frac{dy}{dx} = 2x - ydxdy​=2x−y.

  • At each point (x,y)(x,y)(x,y), draw a short segment with slope 2x−y2x - y2x−y.

  • On the line y=2xy = 2xy=2x, slope is zero.

  • For y<2xy < 2xy<2x, slope positive; for y>2xy > 2xy>2x, slope negative.

  • Solutions follow the arrows; one can sketch approximate integral curves.


Existence and Uniqueness Theorem

For the IVP dydx=f(x,y)\frac{dy}{dx} = f(x,y)dxdy​=f(x,y), y(x0)=y0y(x_0)=y_0y(x0​)=y0​, if fff and ∂f∂y\frac{\partial f}{\partial y}∂y∂f​ are continuous near (x0,y0)(x_0,y_0)(x0​,y0​), then there exists a unique solution in some interval around x0x_0x0​.

Example: dydx=xy\frac{dy}{dx} = \frac{x}{y}dxdy​=yx​, y(1)=2y(1)=2y(1)=2.

  • f(x,y)=x/yf(x,y) = x/yf(x,y)=x/y, ∂f∂y=−x/y2\frac{\partial f}{\partial y} = -x/y^2∂y∂f​=−x/y2 are continuous near (1,2)(1,2)(1,2) (since y≠0y \neq 0y=0). Thus a unique solution exists near x=1x=1x=1.


Autonomous Differential Equations

An autonomous equation does not depend explicitly on the independent variable: dxdt=f(x)\frac{dx}{dt} = f(x)dtdx​=f(x).

Critical points occur when f(x)=0f(x)=0f(x)=0. The behavior near a critical point determines stability:

  • Stable (sink): solutions approach it as t→∞t \to \inftyt→∞.

  • Unstable (source): solutions move away.

  • Half‑stable: attract on one side, repel on the other.

Example: dxdt=−x2(x+1)(x−2)\frac{dx}{dt} = -x^2 (x+1)(x-2)dtdx​=−x2(x+1)(x−2).

  • Critical points: x=0,−1,2x=0, -1, 2x=0,−1,2.

  • Testing sign of f(x)f(x)f(x) between critical points gives:

    • x<−1x < -1x<−1: negative → decreasing → arrow down.

    • −1<x<0-1 < x < 0−1<x<0: positive → increasing → arrow up.

    • 0<x<20 < x < 20<x<2: positive → increasing → arrow up.

    • x>2x > 2x>2: negative → decreasing → arrow down.

  • So x=−1x=-1x=−1 is stable, x=0x=0x=0 is half‑stable, x=2x=2x=2 is unstable.

  • Important: Solutions never cross a critical point.


Second-Order Linear ODEs — Introduction

Standard Form

y′′+p(x)y′+q(x)y=f(x).y'' + p(x) y' + q(x) y = f(x).y′′+p(x)y′+q(x)y=f(x).

If f(x)=0f(x)=0f(x)=0, the equation is homogeneous; otherwise nonhomogeneous.

Superposition Principle

If y1y_1y1​ and y2y_2y2​ are solutions of the homogeneous equation, then y=c1y1+c2y2y = c_1 y_1 + c_2 y_2y=c1​y1​+c2​y2​ is also a solution for any constants c1,c2c_1, c_2c1​,c2​. (Proof uses linearity of the differential operator L=d2dx2+pddx+qL = \frac{d^2}{dx^2} + p\frac{d}{dx} + qL=dx2d2​+pdxd​+q.)

Linear Independence and the Wronskian

Two functions y1,y2y_1, y_2y1​,y2​ are linearly independent if c1y1+c2y2=0c_1 y_1 + c_2 y_2 = 0c1​y1​+c2​y2​=0 for all xxx implies c1=c2=0c_1=c_2=0c1​=c2​=0.

The Wronskian is:

W(y1,y2)=∣y1y2y1′y2′∣.W(y_1,y_2) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix}.W(y1​,y2​)=​y1​y1′​​y2​y2′​​​.

If W≠0W \neq 0W=0 for some xxx, then y1,y2y_1,y_2y1​,y2​ are linearly independent.

Example: y1=sin⁡3xy_1 = \sin 3xy1​=sin3x, y2=cos⁡3xy_2 = \cos 3xy2​=cos3x.
W=sin⁡3x⋅(−3sin⁡3x)−cos⁡3x⋅(3cos⁡3x)=−3(sin⁡23x+cos⁡23x)=−3≠0W = \sin 3x \cdot (-3\sin 3x) - \cos 3x \cdot (3\cos 3x) = -3(\sin^2 3x + \cos^2 3x) = -3 \neq 0W=sin3x⋅(−3sin3x)−cos3x⋅(3cos3x)=−3(sin23x+cos23x)=−3=0 → linearly independent.

General Solution of Homogeneous Equation

If y1,y2y_1, y_2y1​,y2​ are two linearly independent solutions, the general solution is y=c1y1+c2y2y = c_1 y_1 + c_2 y_2y=c1​y1​+c2​y2​.

Nonhomogeneous Equation

For y′′+py′+qy=f(x)y'' + p y' + q y = f(x)y′′+py′+qy=f(x), the general solution is

y=yc+yp,y = y_c + y_p,y=yc​+yp​,

where ycy_cyc​ is the general solution of the homogeneous equation (complementary solution) and ypy_pyp​ is any particular solution of the nonhomogeneous equation. Two methods to find ypy_pyp​: undetermined coefficients and variation of parameters.

Existence and Uniqueness for Second Order

If p,q,fp, q, fp,q,f are continuous on an interval III containing aaa, then the IVP y′′+py′+qy=fy''+py'+qy = fy′′+py′+qy=f, y(a)=by(a)=by(a)=b, y′(a)=b1y'(a)=b_1y′(a)=b1​ has a unique solution on III.


Reduction of Order

If one solution y1y_1y1​ (nonzero) of the homogeneous linear second‑order ODE is known, a second linearly independent solution can be found by assuming y2=y1uy_2 = y_1 uy2​=y1​u, substituting into the ODE, and solving a first‑order equation for uuu.

Reduction of Order Formula (if the ODE is in standard form y′′+p(x)y′+q(x)y=0y'' + p(x) y' + q(x) y = 0y′′+p(x)y′+q(x)y=0):

y2(x)=y1(x)∫e−∫p(x) dx[y1(x)]2 dx.y_2(x) = y_1(x) \int \frac{e^{-\int p(x)\, dx}}{[y_1(x)]^2}\, dx.y2​(x)=y1​(x)∫[y1​(x)]2e−∫p(x)dx​dx.

Example: Given y1=xy_1 = xy1​=x is a solution of x2y′′−xy′+y=0x^2 y'' - x y' + y = 0x2y′′−xy′+y=0.

  • First write in standard form: y′′−1xy′+1x2y=0y'' - \frac{1}{x} y' + \frac{1}{x^2} y = 0y′′−x1​y′+x21​y=0, so p(x)=−1xp(x) = -\frac{1}{x}p(x)=−x1​.

  • e−∫p dx=e∫1xdx=eln⁡x=xe^{-\int p\, dx} = e^{\int \frac{1}{x} dx} = e^{\ln x} = xe−∫pdx=e∫x1​dx=elnx=x.

  • y2=x∫xx2 dx=x∫1x dx=xln⁡xy_2 = x \int \frac{x}{x^2}\, dx = x \int \frac{1}{x}\, dx = x \ln xy2​=x∫x2x​dx=x∫x1​dx=xlnx.

  • General solution: y=c1x+c2xln⁡xy = c_1 x + c_2 x \ln xy=c1​x+c2​xlnx.


Constant Coefficient Second-Order ODEs

For ay′′+by′+cy=0a y'' + b y' + c y = 0ay′′+by′+cy=0 with a,b,ca,b,ca,b,c constants, assume y=eλty = e^{\lambda t}y=eλt. The characteristic equation is aλ2+bλ+c=0a\lambda^2 + b\lambda + c = 0aλ2+bλ+c=0.

Three cases:

  1. Distinct real roots λ1,λ2\lambda_1, \lambda_2λ1​,λ2​: y=c1eλ1t+c2eλ2ty = c_1 e^{\lambda_1 t} + c_2 e^{\lambda_2 t}y=c1​eλ1​t+c2​eλ2​t.

  2. Repeated real root λ\lambdaλ: y=(c1+c2t)eλty = (c_1 + c_2 t) e^{\lambda t}y=(c1​+c2​t)eλt.

  3. Complex conjugate roots α±iβ\alpha \pm i\betaα±iβ: y=eαt(c1cos⁡βt+c2sin⁡βt)y = e^{\alpha t}(c_1 \cos \beta t + c_2 \sin \beta t)y=eαt(c1​cosβt+c2​sinβt).

Example: x′′+x′+3x=0x'' + x' + 3x = 0x′′+x′+3x=0, x(0)=0x(0)=0x(0)=0, x′(0)=22x'(0)=22x′(0)=22.

  • Characteristic: λ2+λ+3=0\lambda^2 + \lambda + 3 = 0λ2+λ+3=0 → λ=−12±112i\lambda = -\frac12 \pm \frac{\sqrt{11}}{2} iλ=−21​±211​​i.

  • General solution: x(t)=e−t/2(c1cos⁡112t+c2sin⁡112t)x(t) = e^{-t/2}\left(c_1 \cos\frac{\sqrt{11}}{2}t + c_2 \sin\frac{\sqrt{11}}{2}t\right)x(t)=e−t/2(c1​cos211​​t+c2​sin211​​t).

  • x(0)=0x(0)=0x(0)=0 ⇒ c1=0c_1=0c1​=0. x′(t)=e−t/2(c2112cos⁡112t−12c2sin⁡112t)x'(t) = e^{-t/2}\left( c_2 \frac{\sqrt{11}}{2} \cos\frac{\sqrt{11}}{2}t - \frac12 c_2 \sin\frac{\sqrt{11}}{2}t \right)x′(t)=e−t/2(c2​211​​cos211​​t−21​c2​sin211​​t).

  • x′(0)=22x'(0)=22x′(0)=22 ⇒ c2112=22c_2 \frac{\sqrt{11}}{2} = 22c2​211​​=22 ⇒ c2=4411=411c_2 = \frac{44}{\sqrt{11}} = 4\sqrt{11}c2​=11​44​=411​.

  • So x(t)=411e−t/2sin⁡112tx(t) = 4\sqrt{11} e^{-t/2} \sin\frac{\sqrt{11}}{2}tx(t)=411​e−t/2sin211​​t (damped oscillation).


Cauchy-Euler Equation

Form: ax2y′′+bxy′+cy=0a x^2 y'' + b x y' + c y = 0ax2y′′+bxy′+cy=0 (for x>0x>0x>0).

Assume y=xry = x^ry=xr. Substitute to get the characteristic equation:

ar(r−1)+br+c=0orar2+(b−a)r+c=0.a r(r-1) + b r + c = 0 \quad \text{or} \quad a r^2 + (b-a) r + c = 0.ar(r−1)+br+c=0orar2+(b−a)r+c=0.

Alternative method: Let x=etx = e^tx=et, transforming the DE into a constant‑coefficient ODE in ttt.

Three cases (for x>0x>0x>0):

  1. Distinct real roots r1,r2r_1, r_2r1​,r2​: y=c1xr1+c2xr2y = c_1 x^{r_1} + c_2 x^{r_2}y=c1​xr1​+c2​xr2​.

  2. Repeated real root rrr: y=(c1+c2ln⁡x)xry = (c_1 + c_2 \ln x) x^{r}y=(c1​+c2​lnx)xr.

  3. Complex conjugate roots α±iβ\alpha \pm i\betaα±iβ: y=xα(c1cos⁡(βln⁡x)+c2sin⁡(βln⁡x))y = x^\alpha \big( c_1 \cos(\beta \ln x) + c_2 \sin(\beta \ln x) \big)y=xα(c1​cos(βlnx)+c2​sin(βlnx)).

Example: x2y′′−3xy′−5y=0x^2 y'' - 3x y' - 5y = 0x2y′′−3xy′−5y=0, x>0x>0x>0.

  • Characteristic: r2+(−3−1)r−5=0r^2 + ( -3 - 1) r - 5 = 0r2+(−3−1)r−5=0 → r2−4r−5=0r^2 - 4r - 5 = 0r2−4r−5=0 → (r−5)(r+1)=0(r-5)(r+1)=0(r−5)(r+1)=0.

  • Roots: r=5,−1r = 5, -1r=5,−1.

  • General solution: y=c1x−1+c2x5=c1x+c2x5y = c_1 x^{-1} + c_2 x^{5} = \frac{c_1}{x} + c_2 x^{5}y=c1​x−1+c2​x5=xc1​​+c2​x5.


Higher Order Constant Coefficient ODEs

For ay(n)+by(n−1)+⋯+dy=0a y^{(n)} + b y^{(n-1)} + \dots + d y = 0ay(n)+by(n−1)+⋯+dy=0, the characteristic equation is aλn+bλn−1+⋯+d=0a \lambda^n + b \lambda^{n-1} + \dots + d = 0aλn+bλn−1+⋯+d=0.

General solution uses the same pattern as second order:

  • Each distinct real root λ\lambdaλ gives term ceλxc e^{\lambda x}ceλx.

  • Each repeated root λ\lambdaλ of multiplicity mmm gives (c1+c2x+⋯+cmxm−1)eλx(c_1 + c_2 x + \dots + c_m x^{m-1}) e^{\lambda x}(c1​+c2​x+⋯+cm​xm−1)eλx.

  • Each complex conjugate pair α±iβ\alpha \pm i\betaα±iβ of multiplicity mmm gives eαx[(A1+A2x+⋯+Amxm−1)cos⁡βx+(B1+⋯+Bmxm−1)sin⁡βx]e^{\alpha x}\big[(A_1 + A_2 x + \dots + A_m x^{m-1})\cos\beta x + (B_1 + \dots + B_m x^{m-1})\sin\beta x\big]eαx[(A1​+A2​x+⋯+Am​xm−1)cosβx+(B1​+⋯+Bm​xm−1)sinβx].

Example: 2y′′′+y′′+y=02y''' + y'' + y = 02y′′′+y′′+y=0.

  • Characteristic: 2λ3+λ2+1=02\lambda^3 + \lambda^2 + 1 = 02λ3+λ2+1=0. Use factor theorem: λ=−1\lambda = -1λ=−1 is a root (since 2(−1)+1+1=02(-1)+1+1=02(−1)+1+1=0).

  • Synthetic division gives (λ+1)(2λ2−λ+1)=0(\lambda+1)(2\lambda^2 - \lambda + 1)=0(λ+1)(2λ2−λ+1)=0.

  • Quadratic gives λ=14±74i\lambda = \frac{1}{4} \pm \frac{\sqrt{7}}{4} iλ=41​±47​​i.

  • General solution: y=c1e−t+et/4(c2cos⁡74t+c3sin⁡74t)y = c_1 e^{-t} + e^{t/4}\left( c_2 \cos\frac{\sqrt{7}}{4}t + c_3 \sin\frac{\sqrt{7}}{4}t \right)y=c1​e−t+et/4(c2​cos47​​t+c3​sin47​​t).


Nonhomogeneous Equations — Undetermined Coefficients

Used for constant‑coefficient linear ODEs ay′′+by′+cy=f(x)a y'' + b y' + c y = f(x)ay′′+by′+cy=f(x) when f(x)f(x)f(x) is of a limited type: exponentials, sines/cosines, polynomials, or combinations/products thereof.

Method:

  1. Find the complementary solution ycy_cyc​ (solve homogeneous).

  2. Guess a form for ypy_pyp​ based on f(x)f(x)f(x):

    • For eβxe^{\beta x}eβx: guess AeβxA e^{\beta x}Aeβx.

    • For sin⁡βx\sin\beta xsinβx or cos⁡βx\cos\beta xcosβx: guess Acos⁡βx+Bsin⁡βxA \cos\beta x + B \sin\beta xAcosβx+Bsinβx.

    • For polynomial of degree nnn: guess Anxn+An−1xn−1+⋯+A0A_n x^n + A_{n-1} x^{n-1} + \dots + A_0An​xn+An−1​xn−1+⋯+A0​.

    • If the guess is already a solution of the homogeneous equation, multiply by xxx (or x2x^2x2 if repeated root).

    • For products/combinations, include all needed terms.

  3. Compute derivatives of ypy_pyp​, substitute into the ODE, and equate coefficients of like terms to solve for the undetermined coefficients.

  4. General solution: y=yc+ypy = y_c + y_py=yc​+yp​.

  5. Apply initial conditions at the end (if given).

Example: y′′−y′−2y=6+8e−2t−4cos⁡2ty'' - y' - 2y = 6 + 8e^{-2t} - 4\cos 2ty′′−y′−2y=6+8e−2t−4cos2t, y(0)=0y(0)=0y(0)=0, y′(0)=2y'(0)=2y′(0)=2.

  • Homogeneous: λ2−λ−2=0\lambda^2 - \lambda - 2 = 0λ2−λ−2=0 → λ=−1,2\lambda = -1, 2λ=−1,2 → yc=c1e−t+c2e2ty_c = c_1 e^{-t} + c_2 e^{2t}yc​=c1​e−t+c2​e2t.

  • For constant 666: guess AAA.

  • For 8e−2t8e^{-2t}8e−2t: guess Be−2tB e^{-2t}Be−2t (since −2-2−2 not a root).

  • For −4cos⁡2t-4\cos 2t−4cos2t: guess Ccos⁡2t+Dsin⁡2tC\cos 2t + D\sin 2tCcos2t+Dsin2t.

  • yp=A+Be−2t+Ccos⁡2t+Dsin⁡2ty_p = A + B e^{-2t} + C\cos 2t + D\sin 2typ​=A+Be−2t+Ccos2t+Dsin2t.

  • Compute yp′y_p'yp′​ and yp′′y_p''yp′′​, substitute, equate coefficients:

    • Constant: −2A=6-2A = 6−2A=6 → A=−3A=-3A=−3.

    • e−2te^{-2t}e−2t: 4B+2B−2B=84B + 2B -2B = 84B+2B−2B=8 → 4B=84B=84B=8 → B=2B=2B=2.

    • cos⁡2t\cos 2tcos2t: −4C−(−2D)−2C=−4-4C - (-2D) -2C = -4−4C−(−2D)−2C=−4 → −6C+2D=−4-6C + 2D = -4−6C+2D=−4 → divide 2: −3C+D=−2-3C + D = -2−3C+D=−2 (1)

    • sin⁡2t\sin 2tsin2t: −4D−(2C)−2D=0-4D - (2C) -2D = 0−4D−(2C)−2D=0 → −6D+2C=0-6D + 2C = 0−6D+2C=0 → C=3DC = 3DC=3D (2)

    • Solve: from (1): −3(3D)+D=−9D+D=−8D=−2-3(3D)+D = -9D+D = -8D = -2−3(3D)+D=−9D+D=−8D=−2 → D=1/5D=1/5D=1/5, C=3/5C=3/5C=3/5.

  • So yp=−3+2e−2t+35cos⁡2t+15sin⁡2ty_p = -3 + 2e^{-2t} + \frac35\cos 2t + \frac15 \sin 2typ​=−3+2e−2t+53​cos2t+51​sin2t.

  • General: y=c1e−t+c2e2t−3+2e−2t+35cos⁡2t+15sin⁡2ty = c_1 e^{-t} + c_2 e^{2t} -3 + 2e^{-2t} + \frac35\cos 2t + \frac15\sin 2ty=c1​e−t+c2​e2t−3+2e−2t+53​cos2t+51​sin2t.

  • Use initial conditions to find c1,c2c_1, c_2c1​,c2​: y(0)=0y(0)=0y(0)=0 gives c1+c2−3+2+35=0c_1+c_2 -3+2+\frac35=0c1​+c2​−3+2+53​=0 → c1+c2=25c_1+c_2 = \frac25c1​+c2​=52​ (eq1).
    y′(t)=−c1e−t+2c2e2t−4e−2t−65sin⁡2t+25cos⁡2ty'(t) = -c_1 e^{-t} + 2c_2 e^{2t} -4e^{-2t} - \frac65\sin 2t + \frac25\cos 2ty′(t)=−c1​e−t+2c2​e2t−4e−2t−56​sin2t+52​cos2t.
    y′(0)=2y'(0)=2y′(0)=2 gives −c1+2c2−4+25=2-c_1+2c_2 -4 + \frac25 = 2−c1​+2c2​−4+52​=2 → −c1+2c2=285-c_1+2c_2 = \frac{28}{5}−c1​+2c2​=528​ (eq2).
    Solve: add eq1 and eq2: 3c2=305=63c_2 = \frac{30}{5} = 63c2​=530​=6 → c2=2c_2=2c2​=2. Then c1=25−2=−85c_1 = \frac25 - 2 = -\frac85c1​=52​−2=−58​.

  • Final solution: y=−85e−t+2e2t−3+2e−2t+35cos⁡2t+15sin⁡2ty = -\frac85 e^{-t} + 2 e^{2t} -3 + 2e^{-2t} + \frac35\cos 2t + \frac15\sin 2ty=−58​e−t+2e2t−3+2e−2t+53​cos2t+51​sin2t.


Variation of Parameters

More general method for finding ypy_pyp​ for y′′+p(x)y′+q(x)y=f(x)y'' + p(x) y' + q(x) y = f(x)y′′+p(x)y′+q(x)y=f(x) (standard form). Works for any continuous f(x)f(x)f(x).

Formula: Given two linearly independent solutions y1,y2y_1, y_2y1​,y2​ of the homogeneous equation, a particular solution is

yp=−y1∫y2fW dx+y2∫y1fW dx,y_p = -y_1 \int \frac{y_2 f}{W}\, dx + y_2 \int \frac{y_1 f}{W}\, dx,yp​=−y1​∫Wy2​f​dx+y2​∫Wy1​f​dx,

where W=y1y2′−y2y1′W = y_1 y_2' - y_2 y_1'W=y1​y2′​−y2​y1′​ is the Wronskian.

Alternative approach: Solve the system

{u1′y1+u2′y2=0u1′y1′+u2′y2′=f(x)\begin{cases} u_1' y_1 + u_2' y_2 = 0 \\ u_1' y_1' + u_2' y_2' = f(x) \end{cases}{u1′​y1​+u2′​y2​=0u1′​y1′​+u2′​y2′​=f(x)​

for u1′,u2′u_1', u_2'u1′​,u2′​, then integrate to get u1,u2u_1, u_2u1​,u2​, and yp=u1y1+u2y2y_p = u_1 y_1 + u_2 y_2yp​=u1​y1​+u2​y2​.

Example: y′′+y=tan⁡xy'' + y = \tan xy′′+y=tanx.

  • Homogeneous: y′′+y=0y''+y=0y′′+y=0 → yc=c1cos⁡x+c2sin⁡xy_c = c_1\cos x + c_2\sin xyc​=c1​cosx+c2​sinx. Choose y1=cos⁡xy_1=\cos xy1​=cosx, y2=sin⁡xy_2=\sin xy2​=sinx.

  • Wronskian: W=cos⁡x⋅cos⁡x−sin⁡x⋅(−sin⁡x)=cos⁡2x+sin⁡2x=1W = \cos x \cdot \cos x - \sin x \cdot (-\sin x) = \cos^2 x + \sin^2 x = 1W=cosx⋅cosx−sinx⋅(−sinx)=cos2x+sin2x=1.

  • Using formula:

    yp=−cos⁡x∫sin⁡x⋅tan⁡x1 dx+sin⁡x∫cos⁡x⋅tan⁡x1 dx=−cos⁡x∫sin⁡2xcos⁡x dx+sin⁡x∫sin⁡x dx.y_p = -\cos x \int \frac{\sin x \cdot \tan x}{1}\, dx + \sin x \int \frac{\cos x \cdot \tan x}{1}\, dx = -\cos x \int \frac{\sin^2 x}{\cos x}\, dx + \sin x \int \sin x\, dx.yp​=−cosx∫1sinx⋅tanx​dx+sinx∫1cosx⋅tanx​dx=−cosx∫cosxsin2x​dx+sinx∫sinxdx.

    ∫sin⁡x dx=−cos⁡x\int \sin x \, dx = -\cos x∫sinxdx=−cosx.
    ∫sin⁡2xcos⁡xdx=∫1−cos⁡2xcos⁡xdx=∫(sec⁡x−cos⁡x)dx=ln⁡∣sec⁡x+tan⁡x∣−sin⁡x\int \frac{\sin^2 x}{\cos x} dx = \int \frac{1-\cos^2 x}{\cos x} dx = \int (\sec x - \cos x) dx = \ln|\sec x + \tan x| - \sin x∫cosxsin2x​dx=∫cosx1−cos2x​dx=∫(secx−cosx)dx=ln∣secx+tanx∣−sinx.
    So yp=−cos⁡x(ln⁡∣sec⁡x+tan⁡x∣−sin⁡x)+sin⁡x(−cos⁡x)=−cos⁡xln⁡∣sec⁡x+tan⁡x∣+cos⁡xsin⁡x−sin⁡xcos⁡x=−cos⁡xln⁡∣sec⁡x+tan⁡x∣y_p = -\cos x (\ln|\sec x + \tan x| - \sin x) + \sin x (-\cos x) = -\cos x \ln|\sec x + \tan x| + \cos x \sin x - \sin x \cos x = -\cos x \ln|\sec x + \tan x|yp​=−cosx(ln∣secx+tanx∣−sinx)+sinx(−cosx)=−cosxln∣secx+tanx∣+cosxsinx−sinxcosx=−cosxln∣secx+tanx∣.

  • General solution: y=c1cos⁡x+c2sin⁡x−cos⁡xln⁡∣sec⁡x+tan⁡x∣y = c_1 \cos x + c_2 \sin x - \cos x \ln|\sec x + \tan x|y=c1​cosx+c2​sinx−cosxln∣secx+tanx∣.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent