Separable differential equations (HL)

Separable differential equations in the form

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

are solved via

f(x)dx=g(y)dy\int f(x)\d x = \int g(y)\d y

when a point (x0,y0)(x_0, y_0) on the solution function is given.

This can equivalently be written as a definite integral

x0xf(w)dw=y0yg(τ)dτ\int_{x_0}^x f(w)\d w = \int_{y_0}^y g(\tau)\d \tau

though it may be less intuitive to work with.

Example: (May 2009 HL TZ1 Paper 2 #8) Solve the differential equation

cos2xeyeeydydx=0\frac{\cos^2 x}{\e^y} - \e^{\e^y}\frac{\d y}{\d x} = 0

given that y=0y = 0 when x=πx = \pi.


cos2xeyeeydydx=0cos2xey=eeydydxcos2xeyeey=dydxcos2xdx=eyeeydy\begin{align*}\frac{\cos^2 x}{\e^y} - \e^{\e^y}\frac{\d y}{\d x} &= 0 \\ \frac{\cos^2 x}{\e^y} &= \e^{\e^y}\frac{\d y}{\d x} \\ \frac{\cos^2 x}{\e^y\cdot \e^{\e^y}} &= \frac{\d y}{\d x} \\ \int \cos^2 x\d x &= \int \e^y \cdot \e^{\e^y}\d y \end{align*}

The left side requires cos2x=2cos2x1\cos2x = 2\cos^2x-1 and right side is in the form f(y)ef(y)f^\prime(y)\e^{f(y)}. It may be a good time to say that abc=a(bc)(ab)ca^{b^c} = a^{\left(b^c\right)} \neq \left(a^b\right)^c

LHS=(12cos2x+12)dx=14sin2x+12x+C\begin{align*}\text{LHS} &= \int \left(\frac12 \cos 2x + \frac12\right)\d x \\ &= \frac14 \sin2x + \frac12x + C \end{align*}
RHS=(ddyeyeey)dy=eey+D\begin{align*}\text{RHS} &= \int \left(\frac{\d }{\d y}\e^y \cdot \e^{\e^y}\right)\d y \\ &= \e^{\e^y} + D \end{align*}

The general solution is

14sin2x+12x=eey+E\frac14 \sin2x + \frac12x = \e^{\e^y} + E

where C,D,EC, D, E are constants, you could also use C1,C2,C3C_1, C_2, C_3 but it gets messy under time pressure. It’s entirely acceptable to make up new constants, as opposed to propagating them. Though constants of integration aren’t always added, as we’ll see in integrating factor.

We are not done yet. It passes through (π,0)(\pi, 0), so

14sin(2π)+12(π)=ee0+E0+π2=e1+Eπ2e=E\begin{align*}\frac14 \sin(2\pi) + \frac12(\pi) &= \e^{\e^{0}} + E \\ 0 + \frac\pi2 &= \e^1 + E \\ \frac\pi2 - \e &= E \end{align*}

Final answer:

14sin2x+x2=eey+π2e\frac14 \sin2x + \frac x2 = \e^{\e^y} + \frac\pi2 - \e \qed

The original markscheme accepted equivalent forms, though often it will ask you to evaluate it at a particular value of xx, just to make the grading easier.

Tips

dydx=f(x)g(y)    f(x)dx=1g(y)dy\frac{\d y}{\d x} = f(x)g(y) \iff \int f(x)\d x = \int \frac{1}{g(y)}\d y