Further calculus: implicit differentiation, differential equations and Maclaurin series
IB Math AA · Calculus
Implicit differentiation and related rates
Differentiate both sides with respect to $x$, treating $y$ as a function of $x$, so $\dfrac{d}{dx}\left(y^{2}\right)=2y\dfrac{dy}{dx}$ and $\dfrac{d}{dx}(xy)=y+x\dfrac{dy}{dx}$.
Related rates use the same idea with $t$ as the variable: $\dfrac{dA}{dt}=\dfrac{dA}{dr}\cdot\dfrac{dr}{dt}$.
Separable differential equations
$$\frac{dy}{dx}=f(x)g(y)\;\Longrightarrow\;\int\frac{dy}{g(y)}=\int f(x)\,dx$$One arbitrary constant, applied once. Use the boundary condition immediately rather than carrying the constant through further algebra.
Maclaurin series
$$f(x)=f(0)+f'(0)x+\frac{f''(0)}{2!}x^{2}+\frac{f'''(0)}{3!}x^{3}+\cdots$$Three series worth knowing outright:
$$e^{x}=1+x+\frac{x^{2}}{2!}+\cdots,\qquad \sin x=x-\frac{x^{3}}{3!}+\cdots,\qquad \ln(1+x)=x-\frac{x^{2}}{2}+\cdots$$Composite series are usually faster obtained by substituting into a known series than by differentiating repeatedly.
Worked example: separable differential equation with an initial condition
Solve $\dfrac{dy}{dx}=xy$ with $y=2$ when $x=0$, giving the result as $y$ in terms of $x$.
Solution
Step 1 — separate the variables. Bring everything containing $y$ to one side, everything containing $x$ to the other:
$$\int\frac{dy}{y}=\int x\,dx$$Step 2 — integrate both sides, adding the constant once.
$$\ln|y|=\frac{x^{2}}{2}+c$$Step 3 — exponentiate. Note the constant sits in the exponent so after exponentiating it becomes a factor, not an added term:
$$y=e^{x^{2}/2+c}=e^{c}\cdot e^{x^{2}/2}=Ae^{x^{2}/2}$$Step 4 — use the initial condition right away. At $x=0$, $e^{0}=1$, so
$$2=A\;\Longrightarrow\;y=2e^{x^{2}/2}$$Check backwards: $\dfrac{dy}{dx}=2e^{x^{2}/2}\cdot x=xy$. Matches the equation given.
Two common errors. First, writing $y=e^{x^{2}/2}+A$ — adding the constant after exponentiating; testing backwards shows at once that it does not satisfy the equation. Second, forgetting the coefficient $\dfrac{1}{2}$ in the exponent, i.e. integrating $x$ as $x$ instead of $\dfrac{x^{2}}{2}$.
Worked example: Maclaurin expansion by substituting into known series
Find the Maclaurin expansion of $e^{2x}\cos x$ up to the term in $x^{2}$.
Solution
Step 1 — take the two component series, no differentiation at all. Replace $x$ with $2x$ in the series for $e^{x}$:
$$e^{2x}=1+2x+\frac{(2x)^{2}}{2!}+\cdots=1+2x+2x^{2}+\cdots$$$$\cos x=1-\frac{x^{2}}{2!}+\cdots=1-\frac{x^{2}}{2}+\cdots$$Step 2 — multiply the two series, keeping only up to degree two. Every product of degree three or higher can be dropped:
$$\left(1+2x+2x^{2}\right)\left(1-\frac{x^{2}}{2}\right)$$$$=1+2x+2x^{2}-\frac{x^{2}}{2}+\left(\text{degree}\ge 3\right)$$$$=1+2x+\frac{3x^{2}}{2}+\cdots$$Why not differentiate three times. The direct method requires computing $f$, $f'$, $f''$ of a product and then substituting $x=0$ into each — three applications of the product rule, each one a chance for a sign error. Substituting into series needs only one polynomial multiplication, and it also tells you straight away which terms can be dropped: every product whose total degree exceeds the degree to be kept.
Note at the substitution step: $\dfrac{(2x)^{2}}{2!}=\dfrac{4x^{2}}{2}=2x^{2}$ — you must square all of $2x$, not just square $x$.