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.

initial condition (0, 1) dy/dx = x — the slope depends only on x, so all dashes in the same column are parallel y = x²/2 + 1
What the arbitrary constant is, seen in a picture. Each small dash is the slope that the differential equation prescribes at that point. The general solution $y=\dfrac{x^{2}}{2}+c$ is not one curve but a whole family of curves, each value of $c$ giving a curve that slides up or down. The initial condition is what picks exactly one curve from that family — here the point $(0,1)$ picks $c=1$. Note that all dashes in the same column are parallel, because $\dfrac{dy}{dx}=x$ depends only on the x-coordinate; with an equation like $\dfrac{dy}{dx}=xy$ the slope changes with both coordinates and the slope field looks quite twisted.

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$.

Common mistake

Forgetting the factor $\dfrac{dy}{dx}$ when differentiating an implicit function. For $x^{2}+y^{2}=25$, the correct derivative is $2x+2y\dfrac{dy}{dx}=0$; writing $2x+2y=0$ treats $y$ as a constant, even though the whole problem rests on the assumption that $y$ is a function of $x$. What makes this trap dangerous is that the wrong result still produces a plausible number: at the point $(3,4)$, the wrong method gives an undefined $\dfrac{dy}{dx}$ or a meaningless value, but in many other problems it gives a perfectly ordinary-looking number. A mechanical rule that never fails: every time your pen touches the letter $y$, immediately write $\dfrac{dy}{dx}$ next to it, and only then decide whether anything simplifies. The same principle applies to related rates, except the variable is $t$: every quantity that changes with time contributes a derivative with respect to $t$, even quantities the question does not ask about.

Key takeaway

The three tools in this lesson are all the chain rule seen from three sides: implicit differentiation is the chain rule when the dependent variable is hidden; related rates is the chain rule with time as the intermediate variable; separation of variables is the chain rule run backwards. Once you see that connection, you do not have to memorize three separate sets of rules.

← Integration: antiderivatives, area and volume · All IB Math AA lessons · Practice IB Math AA questions (free, instant scoring)