Unit 1, lesson 3

Calculus and Complex Numbers for Differential Equations

The product and chain rules, antiderivatives and constants of integration, the fundamental theorem of calculus, exponentials and logarithms, complex numbers and Euler's formula, used to build and check solutions.

  • Video 3
  • Equations, Solutions and Calculus Tools

Does the function y=e−tcos⁡2ty = e^{-t}\cos 2t solve y′′+2y′+5y=0y'' + 2y' + 5y = 0? Answering takes two derivatives, each needing the product rule and the chain rule, and seeing where such a function comes from takes complex numbers and Euler’s formula. This lesson collects the calculus used to build and check solutions, with the conditions each tool needs, and settles that question at the end. Throughout, the independent variable is tt and y′=dy/dty' = dy/dt.

Key terms

Product and chain rules

Definition If uu and vv are differentiable at tt, then so is their product, and

(uv)′=u′v+uv′.(uv)' = u'v + uv'.

If gg is differentiable at tt and ff is differentiable at g(t)g(t), then the composition f(g(t))f(g(t)) is differentiable at tt, and

ddtf(g(t))=f′(g(t)) g′(t).\frac{d}{dt} f\bigl(g(t)\bigr) = f'\bigl(g(t)\bigr)\,g'(t).

Both rules need differentiability at the point in question. A formula that differentiates cleanly on each side of a corner, a jump or an excluded point does not by itself give a derivative at that point.

In plain words When two factors both change, each one contributes its own change while the other is held as it is. When one function sits inside another, the rate of the outer layer is multiplied by the rate of the inner layer.

Example For te−2tte^{-2t} the first factor has derivative 11, and the second has derivative −2e−2t-2e^{-2t}, where the −2-2 is the chain rule factor from the inner function −2t-2t. So

ddt(te−2t)=e−2t−2te−2t=(1−2t)e−2t.\begin{aligned} \frac{d}{dt}\left(te^{-2t}\right) &= e^{-2t} - 2te^{-2t} \\[0.4em] &= (1 - 2t)e^{-2t}. \end{aligned}

Treating the factor tt as a constant would lose the term e−2te^{-2t}. The chain rule also applies when the inner function is the unknown itself. For a differentiable function y(t)y(t),

ddt[y(t)2]=2y(t) y′(t),\frac{d}{dt}\bigl[y(t)^2\bigr] = 2y(t)\,y'(t),

and the factor y′(t)y'(t) is exactly what implicit differentiation produces.

Antiderivatives and constants of integration

Definition An antiderivative of ff on an interval II is a function FF with F′(t)=f(t)F'(t) = f(t) for every tt in II. If FF is one antiderivative, then every antiderivative on II is F+CF + C for some constant CC, because a function with zero derivative on an interval is constant. The indefinite integral ∫f(t) dt=F(t)+C\int f(t)\,dt = F(t) + C names this whole family. On a set made of several separate intervals, the constant can be different on each piece.

Two rules for finding antiderivatives come from the derivative rules. Substitution reverses the chain rule, and integration by parts reverses the product rule. For uu and vv continuously differentiable on II,

∫uv′ dt=uv−∫u′v dt,\int uv'\,dt = uv - \int u'v\,dt,

often written ∫u dv=uv−∫v du\int u\,dv = uv - \int v\,du.

In plain words Differentiating erases constants, so going back from a rate to a function brings a free constant with it. The constant stores the starting information that the derivative threw away, and an initial value fixes it.

Example To integrate te−2tte^{-2t} by parts, take u=tu = t and v′=e−2tv' = e^{-2t}, so that u′=1u' = 1 and v=−12e−2tv = -\tfrac{1}{2}e^{-2t}. Then

∫te−2t dt=−12te−2t+12∫e−2t dt=−14(2t+1)e−2t+C.\begin{aligned} &\int te^{-2t}\,dt \\[0.4em] &\quad = -\tfrac{1}{2}te^{-2t} + \tfrac{1}{2}\int e^{-2t}\,dt \\[0.4em] &\quad = -\tfrac{1}{4}(2t + 1)e^{-2t} + C. \end{aligned}

Differentiating the result with the product rule gives back te−2tte^{-2t}, which confirms it on all of R\mathbb{R}.

Fundamental theorem of calculus

Definition Let ff be continuous on an open interval II and let t0t_0 be a point of II. The first part of the theorem says that the function

A(t)=∫t0tf(s) dsA(t) = \int_{t_0}^{t} f(s)\,ds

is differentiable on II with A′(t)=f(t)A'(t) = f(t). The second part says that ∫abf(s) ds=F(b)−F(a)\int_a^b f(s)\,ds = F(b) - F(a) for every antiderivative FF of ff on II and all aa and bb in II. Consequently the initial-value problem y′=f(t)y' = f(t), y(t0)=y0y(t_0) = y_0 has exactly one solution on II,

y(t)=y0+∫t0tf(s) ds,y(t) = y_0 + \int_{t_0}^{t} f(s)\,ds,

because any two solutions differ by a constant, and that constant is 00 at t0t_0. The letter ss is a dummy variable, kept different from the upper limit tt. Continuity of ff is the hypothesis. If ff has a jump at a point, the accumulated function AA is still continuous there but is not differentiable at that point.

In plain words The value now is the starting value plus everything the rate has added since the start. The lower limit anchors the function at the initial time, and the upper limit lets it move.

Example For y′=2ty' = 2t with y(1)=4y(1) = 4,

y(t)=4+∫1t2s ds=4+(t2−1)=t2+3.\begin{aligned} y(t) &= 4 + \int_1^t 2s\,ds \\[0.4em] &= 4 + (t^2 - 1) \\[0.4em] &= t^2 + 3. \end{aligned}

The same formula works when no elementary antiderivative exists. The problem y′=e−t2y' = e^{-t^2}, y(0)=1y(0) = 1 has the solution y(t)=1+∫0te−s2 dsy(t) = 1 + \int_0^t e^{-s^2}\,ds on R\mathbb{R}, and the first part of the theorem confirms it directly, since the integrand is continuous.

Exponential and natural logarithm

Definition For every real constant aa, the function eate^{at} is differentiable on R\mathbb{R}, with

ddteat=aeat.\frac{d}{dt}e^{at} = ae^{at}.

The natural logarithm ln⁡t\ln t is defined for t>0t > 0 and is the inverse of the exponential, so eln⁡t=te^{\ln t} = t for t>0t > 0 and ln⁡(et)=t\ln(e^{t}) = t for every real tt. Its derivative is 1/t1/t for t>0t > 0. Since ln⁡∣t∣\ln\lvert t \rvert also has derivative 1/t1/t for t<0t < 0, on any interval that does not contain 00

∫dtt=ln⁡∣t∣+C.\int \frac{dt}{t} = \ln\lvert t \rvert + C.

The formula never applies across 00, where 1/t1/t is undefined, and it is used on one of the intervals (−∞,0)(-\infty, 0) and (0,∞)(0, \infty) at a time.

In plain words An exponential is a function whose rate is proportional to its own value, which is exactly what an equation like y′=ayy' = ay asks for. The logarithm undoes the exponential, and the absolute value lets you integrate 1/t1/t on the negative side too, but never across zero.

Example Solve y′=ayy' = ay for a real constant aa. On an interval where yy is never zero, dividing by yy gives y′/y=ay'/y = a, and the chain rule shows that the left side is the derivative of ln⁡∣y∣\ln\lvert y \rvert. Integrating gives ln⁡∣y∣=at+c\ln\lvert y \rvert = at + c, so y=±eceaty = \pm e^{c}e^{at}, which is CeatCe^{at} with C≠0C \ne 0. The division has lost the zero function, which also solves the equation. The complete answer is y=Ceaty = Ce^{at} for every real CC, and the product rule confirms that nothing else is missing. If y′=ayy' = ay on an interval, then

ddt(e−aty)=e−at(y′−ay)=0,\begin{aligned} \frac{d}{dt}\bigl(e^{-at}y\bigr) &= e^{-at}(y' - ay) \\[0.4em] &= 0, \end{aligned}

so e−atye^{-at}y is a constant CC on that interval.

Complex numbers

Definition A complex number has the form z=a+ibz = a + ib with real numbers aa and bb, where the imaginary unit ii satisfies i2=−1i^2 = -1. The real part is Re⁡z=a\operatorname{Re} z = a and the imaginary part is Im⁡z=b\operatorname{Im} z = b. Complex numbers are added part by part and multiplied by expanding brackets and replacing i2i^2 by −1-1, so (a+ib)(c+id)=(ac−bd)+i(ad+bc)(a + ib)(c + id) = (ac - bd) + i(ad + bc). The conjugate of zz is zˉ=a−ib\bar{z} = a - ib and its modulus is ∣z∣=a2+b2\lvert z \rvert = \sqrt{a^2 + b^2}, with zzˉ=∣z∣2z\bar{z} = \lvert z \rvert^2. Two complex numbers are equal exactly when their real parts are equal and their imaginary parts are equal, so one complex equation carries two real equations.

In plain words A complex number is a point of the plane, with the real part along one axis and the imaginary part along the other. The one new rule, i2=−1i^2 = -1, is all you need to compute with it.

Example The quadratic r2+2r+5=0r^2 + 2r + 5 = 0 has discriminant 4−20=−164 - 20 = -16, which is negative, so it has no real roots. The two complex numbers whose square is −16-16 are ±4i\pm 4i, and the quadratic formula gives

r=−2±4i2=−1±2i.r = \frac{-2 \pm 4i}{2} = -1 \pm 2i.

To check the root −1+2i-1 + 2i, square it to get 1−4i+4i2=−3−4i1 - 4i + 4i^2 = -3 - 4i. Adding 2r=−2+4i2r = -2 + 4i and 55 gives the real part −3−2+5=0-3 - 2 + 5 = 0 and the imaginary part −4+4=0-4 + 4 = 0, so r2+2r+5=0r^2 + 2r + 5 = 0. The two roots are conjugates of each other, as the roots of a real quadratic with negative discriminant always are.

Euler’s formula and the complex exponential

Definition Euler’s formula says that for every real θ\theta

eiθ=cos⁡θ+isin⁡θ.e^{i\theta} = \cos\theta + i\sin\theta.

One way to see it uses the exponential series ez=∑n=0∞zn/n!e^{z} = \sum_{n=0}^{\infty} z^n/n!, which converges for every complex zz. With z=iθz = i\theta the powers of ii repeat in the cycle i,−1,−i,1i, -1, -i, 1, the even-power terms add up to the cosine series, and the odd-power terms add up to ii times the sine series. The regrouping is allowed because the series converges absolutely. For a complex constant r=a+ibr = a + ib with real aa and bb and a real variable tt, the complex exponential is

ert=eat(cos⁡bt+isin⁡bt).e^{rt} = e^{at}(\cos bt + i\sin bt).

The derivative of a complex-valued function of tt is taken part by part, and with it ddtert=rert\tfrac{d}{dt}e^{rt} = re^{rt}, the same rule as for a real exponent. If a homogeneous linear equation has real coefficients and a complex-valued function u+ivu + iv solves it, then its real part uu and its imaginary part vv are real solutions. Substituting u+ivu + iv gives the result for uu plus ii times the result for vv, and a complex number is zero only when both parts are zero.

In plain words The number eiθe^{i\theta} is the point at angle θ\theta on the unit circle. For b≠0b \ne 0 the point eibte^{ibt} turns around that circle as tt grows, and the real factor eate^{at} scales its distance from the origin. So the real part eatcos⁡bte^{at}\cos bt is an oscillation whose amplitude decays when a<0a < 0, grows when a>0a > 0 and stays fixed when a=0a = 0.

Example The root r=−1+2ir = -1 + 2i found above makes z=ertz = e^{rt} a solution of y′′+2y′+5y=0y'' + 2y' + 5y = 0, since z′=rzz' = rz and z′′=r2zz'' = r^2z give z′′+2z′+5z=(r2+2r+5)z=0z'' + 2z' + 5z = (r^2 + 2r + 5)z = 0. The coefficients are real, so the real part y=e−tcos⁡2ty = e^{-t}\cos 2t is a real solution. A direct check with the product and chain rules agrees,

y′=e−t(−cos⁡2t−2sin⁡2t),y′′=e−t(−3cos⁡2t+4sin⁡2t).\begin{aligned} y' &= e^{-t}(-\cos 2t - 2\sin 2t), \\[0.4em] y'' &= e^{-t}(-3\cos 2t + 4\sin 2t). \end{aligned}

In y′′+2y′+5yy'' + 2y' + 5y the cosine coefficients are −3-3, −2-2 and 55, which add up to 00, and the sine coefficients are 44 and −4-4, which cancel. So the function solves the equation for every real tt, with y(0)=1y(0) = 1 and y′(0)=−1y'(0) = -1.

Check yourself

  1. Differentiate y=t2e−3ty = t^2e^{-3t} and name the rule behind each step.
Show the answer

The product rule with u=t2u = t^2 and v=e−3tv = e^{-3t} gives u′v+uv′u'v + uv'. Here u′=2tu' = 2t, and the chain rule gives v′=−3e−3tv' = -3e^{-3t}, since the inner function −3t-3t has derivative −3-3. So

y′=2te−3t−3t2e−3t=t(2−3t)e−3t.\begin{aligned} y' &= 2te^{-3t} - 3t^2e^{-3t} \\[0.4em] &= t(2 - 3t)e^{-3t}. \end{aligned}
  1. A classmate computes the integral below and gets 00. What is wrong?
∫−11dtt=ln⁡∣1∣−ln⁡∣−1∣=0\int_{-1}^{1} \frac{dt}{t} = \ln\lvert 1 \rvert - \ln\lvert -1 \rvert = 0
Show the answer

The second part of the fundamental theorem needs the integrand to be continuous on the whole interval [−1,1][-1, 1], and 1/t1/t is not even defined at t=0t = 0. The antiderivative ln⁡∣t∣\ln\lvert t \rvert is valid only on intervals that do not contain 00, so the computation jumps across the point where the formula breaks down.

The integral is improper at 00, and it diverges. For 0<ε<10 < \varepsilon < 1,

∫ε1dtt=−ln⁡ε,\int_{\varepsilon}^{1} \frac{dt}{t} = -\ln\varepsilon,

which grows without bound as ε→0+\varepsilon \to 0^+, and the piece over [−1,−ε][-1, -\varepsilon] equals ln⁡ε\ln\varepsilon, which goes to −∞-\infty. So the integral has no value, and in particular it is not 00. Cancelling the two pieces symmetrically defines a principal value, which is a different notion.

  1. Find the roots of r2+4r+13=0r^2 + 4r + 13 = 0, use Euler’s formula to write two real solutions of y′′+4y′+13y=0y'' + 4y' + 13y = 0, and check one of them directly.
Show the answer

The discriminant is 16−52=−3616 - 52 = -36, so the roots are r=(−4±6i)/2=−2±3ir = (-4 \pm 6i)/2 = -2 \pm 3i. For r=−2+3ir = -2 + 3i, the function ert=e−2t(cos⁡3t+isin⁡3t)e^{rt} = e^{-2t}(\cos 3t + i\sin 3t) solves the equation by the same argument as in the last key term. The coefficients are real, so its real and imaginary parts

e−2tcos⁡3t,e−2tsin⁡3te^{-2t}\cos 3t, \qquad e^{-2t}\sin 3t

are real solutions. To check y=e−2tsin⁡3ty = e^{-2t}\sin 3t, write c=cos⁡3tc = \cos 3t and s=sin⁡3ts = \sin 3t. The product and chain rules give

y′=e−2t(3c−2s),y′′=e−2t(−12c−5s).\begin{aligned} y' &= e^{-2t}(3c - 2s), \\[0.4em] y'' &= e^{-2t}(-12c - 5s). \end{aligned}

In y′′+4y′+13yy'' + 4y' + 13y the cosine coefficients are −12-12 and 1212, and the sine coefficients are −5-5, −8-8 and 1313, so both groups add up to 00 and the function solves the equation for every real tt.

How this lesson connects