Class 12 Maths, Worked in Full Past papersGet updates
Chapter 9 · Differential Equations

Example 19: y=c1eaxcos⁡bx+c2eaxsin⁡bxy = c_1e^{ax}\cos bx + c_2e^{ax}\sin bx solves y′′−2ay′+(a2+b2)y=0y'' - 2ay' + (a^2+b^2)y = 0

ExamplesMiscellaneous Examples: verifying a solution · Section 9.3
The question

Verify that the function y=c1eaxcos⁡bx+c2eaxsin⁡bxy = c_1e^{ax}\cos bx + c_2e^{ax}\sin bx⁠, where c1c_1⁠, c2c_2 are arbitrary constants is a solution of the differential equation

d2ydx2−2adydx+(a2+b2)y=0\frac{d^2y}{dx^2} - 2a\frac{dy}{dx} + \left(a^2 + b^2\right)y = 0
Exam answer

Let u=c1cos⁡bx+c2sin⁡bxu = c_1\cos bx + c_2\sin bx⁠, so that y=eaxuy = e^{ax}u⁠.

u′=−bc1sin⁡bx+bc2cos⁡bxu′′=−b2(c1cos⁡bx+c2sin⁡bx)=−b2u\begin{aligned} u' &= -bc_1\sin bx + bc_2\cos bx \\ u'' &= -b^2(c_1\cos bx + c_2\sin bx) \\ &= -b^2u \end{aligned}

By the product rule,

dydx=aeaxu+eaxu′=eax(au+u′)d2ydx2=aeax(au+u′)+eax(au′+u′′)=eax(a2u+2au′+u′′)\begin{aligned} \frac{dy}{dx} &= ae^{ax}u + e^{ax}u' \\ &= e^{ax}(au + u') \\ \frac{d^2y}{dx^2} &= ae^{ax}(au + u') \\ &\qquad + e^{ax}(au' + u'') \\ &= e^{ax}(a^2u + 2au' + u'') \end{aligned}

Substituting in the L.H.S. of the equation,

d2ydx2−2adydx+(a2+b2)y=eax[a2u+2au′+u′′−2a2u−2au′+(a2+b2)u]=eax(u′′+b2u)=eax(−b2u+b2u)=0\begin{aligned} &\frac{d^2y}{dx^2} - 2a\frac{dy}{dx} + (a^2 + b^2)y \\ &= e^{ax}\bigg[a^2u + 2au' + u'' \\ &\qquad - 2a^2u - 2au' + (a^2 + b^2)u\bigg] \\ &= e^{ax}(u'' + b^2u) \\ &= e^{ax}(-b^2u + b^2u) = 0 \end{aligned}

∴\therefore L.H.S. =0== 0 = R.H.S. Hence the given function is a solution of the given differential equation.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

To verify that a function is a solution, find the derivatives the equation needs, substitute them, and show that the left side becomes the right side for every xx (and here for every c1c_1⁠, c2c_2⁠). The function is a product, eaxe^{ax} times a combination of cos⁡bx\cos bx and sin⁡bx\sin bx⁠, so the product rule does the work; after substituting, the coefficient of sin⁡bx\sin bx and the coefficient of cos⁡bx\cos bx each come to 0.

Given, to find, and the plan
Given
y=c1eaxcos⁡bx+c2eaxsin⁡bxy = c_1e^{ax}\cos bx + c_2e^{ax}\sin bx⁠, with aa⁠, bb fixed real constants and c1c_1⁠, c2c_2 arbitrary constants.
To show
d2ydx2−2adydx+(a2+b2)y=0\frac{d^2y}{dx^2} - 2a\frac{dy}{dx} + (a^2 + b^2)y = 0 for all real xx⁠.
Plan
(1) Write y=eax[c1cos⁡bx+c2sin⁡bx]y = e^{ax}[c_1\cos bx + c_2\sin bx]⁠. (2) Find dydx\frac{dy}{dx}⁠. (3) Find d2ydx2\frac{d^2y}{dx^2}⁠. (4) Substitute and collect the sin⁡bx\sin bx and cos⁡bx\cos bx terms. (5) Conclude. (6) See a shorter route. (7) Check with numbers.

Basics you need

1What "is a solution" means

A function is a solution of a differential equation when, substituted together with its derivatives, it makes L.H.S. = R.H.S. (Section 9.3). Lesson: general and particular solutions

2Product rule

(fg)′=f′g+fg′(fg)' = f'g + fg' (Chapter 5, Section 5.3). Basics: y′ is the slope, y″ its rate of change

3Derivatives of eaxe^{ax}⁠, cos⁡bx\cos bx⁠, sin⁡bx\sin bx

(eax)′=aeax(e^{ax})' = ae^{ax}⁠, (cos⁡bx)′=−bsin⁡bx(\cos bx)' = -b\sin bx⁠, (sin⁡bx)′=bcos⁡bx(\sin bx)' = b\cos bx⁠, by the chain rule (Chapter 5, Sections 5.3.1 and 5.4). Basics: exponentials

4Two constants for order 2

The function has two arbitrary constants and the equation has order 2, as expected of a general solution. Basics: order n gives n constants

Solution

  1. Write the function as one product

    y=eax[c1cos⁡bx+c2sin⁡bx].…(1)y = e^{ax}\left[c_1\cos bx + c_2\sin bx\right].\quad\ldots(1)
    Taking out the common factor eaxe^{ax} leaves one product of two factors, so each derivative is one use of the product rule.
    Factorising; the product rule needs a product. Basics: derivatives
  2. The first derivative

    dydx=eax[−bc1sin⁡bx+bc2cos⁡bx]+[c1cos⁡bx+c2sin⁡bx]eax⋅a=eax[(bc2+ac1)cos⁡bx+(ac2−bc1)sin⁡bx].…(2)\begin{aligned} \frac{dy}{dx} &= e^{ax}\left[-bc_1\sin bx + bc_2\cos bx\right] \\ &\quad + \left[c_1\cos bx + c_2\sin bx\right]e^{ax}\cdot a \\ &= e^{ax}\big[(bc_2 + ac_1)\cos bx \\ &\qquad + (ac_2 - bc_1)\sin bx\big].\quad\ldots(2) \end{aligned}
    Product rule: (first)(derivative of second) + (second)(derivative of first). Then collect the cos⁡bx\cos bx terms (bc2bc_2 and ac1ac_1⁠) and the sin⁡bx\sin bx terms (−bc1-bc_1 and ac2ac_2⁠).
    Product and chain rules (Chapter 5, Sections 5.3 and 5.3.1). Basics: derivatives
  3. The second derivative

    Differentiate (2) the same way:

    d2ydx2=eax[(bc2+ac1)(−bsin⁡bx)+(ac2−bc1)(bcos⁡bx)]+[(bc2+ac1)cos⁡bx+(ac2−bc1)sin⁡bx]eax⋅a=eax[(a2c2−2abc1−b2c2)sin⁡bx+(a2c1+2abc2−b2c1)cos⁡bx].\begin{aligned} &\frac{d^2y}{dx^2} \\ &= e^{ax}\big[(bc_2 + ac_1)(-b\sin bx) \\ &\qquad + (ac_2 - bc_1)(b\cos bx)\big] \\ &\quad + \big[(bc_2 + ac_1)\cos bx \\ &\qquad + (ac_2 - bc_1)\sin bx\big]e^{ax}\cdot a \\ &= e^{ax}\big[(a^2c_2 - 2abc_1 - b^2c_2)\sin bx \\ &\qquad + (a^2c_1 + 2abc_2 - b^2c_1)\cos bx\big]. \end{aligned}
    Collect again. The sin⁡bx\sin bx terms: −b(bc2+ac1)+a(ac2−bc1)-b(bc_2 + ac_1) + a(ac_2 - bc_1) =a2c2−2abc1−b2c2= a^2c_2 - 2abc_1 - b^2c_2⁠. The cos⁡bx\cos bx terms: b(ac2−bc1)+a(bc2+ac1)b(ac_2 - bc_1) + a(bc_2 + ac_1) =a2c1+2abc2−b2c1= a^2c_1 + 2abc_2 - b^2c_1⁠.
    Second order derivative (Chapter 5, Section 5.7). Basics: y″ is how fast the slope changes
  4. Substitute and collect sin⁡bx\sin bx and cos⁡bx\cos bx

    In d2ydx2−2adydx+(a2+b2)y\frac{d^2y}{dx^2} - 2a\frac{dy}{dx} + (a^2 + b^2)y⁠, every term has the factor eaxe^{ax}⁠. The coefficient of eaxsin⁡bxe^{ax}\sin bx is

    (a2c2−2abc1−b2c2)−2a(ac2−bc1)+(a2+b2)c2=a2c2−2abc1−b2c2−2a2c2+2abc1+a2c2+b2c2=0,\begin{aligned} &(a^2c_2 - 2abc_1 - b^2c_2) - 2a(ac_2 - bc_1) \\ &\quad + (a^2 + b^2)c_2 \\ &= a^2c_2 - 2abc_1 - b^2c_2 - 2a^2c_2 \\ &\quad + 2abc_1 + a^2c_2 + b^2c_2 = 0, \end{aligned}

    and the coefficient of eaxcos⁡bxe^{ax}\cos bx is

    (a2c1+2abc2−b2c1)−2a(bc2+ac1)+(a2+b2)c1=a2c1+2abc2−b2c1−2abc2−2a2c1+a2c1+b2c1=0.\begin{aligned} &(a^2c_1 + 2abc_2 - b^2c_1) - 2a(bc_2 + ac_1) \\ &\quad + (a^2 + b^2)c_1 \\ &= a^2c_1 + 2abc_2 - b^2c_1 - 2abc_2 \\ &\quad - 2a^2c_1 + a^2c_1 + b^2c_1 = 0. \end{aligned}
    The three pieces come from d2ydx2\frac{d^2y}{dx^2}⁠, from −2a-2a times (2), and from (a2+b2)(a^2 + b^2) times (1). In each line every term cancels with another: a2c2−2a2c2+a2c2=0a^2c_2 - 2a^2c_2 + a^2c_2 = 0⁠, −2abc1+2abc1=0-2abc_1 + 2abc_1 = 0⁠, −b2c2+b2c2=0-b^2c_2 + b^2c_2 = 0⁠, and the same pattern in the second. (In the book's line for the L.H.S., the opening bracket before a2c2a^2c_2 is missing; the working is unaffected.)
    Substituting into the equation (Section 9.3). Lesson: is it a solution? Examples 2 and 3
  5. Conclude

    L.H.S.=eax[0×sin⁡bx+0×cos⁡bx]=0=R.H.S.\begin{aligned} \text{L.H.S.} &= e^{ax}\left[0\times\sin bx + 0\times\cos bx\right] \\ &= 0 = \text{R.H.S.} \end{aligned}

    Hence the given function is a solution of the given differential equation, for every c1c_1⁠, c2c_2 and every real xx⁠.

    Both coefficients are 0 identically, whatever aa⁠, bb⁠, c1c_1⁠, c2c_2 and xx are, so the left side is 0 for all xx⁠.
    Section 9.3: a function that makes L.H.S. = R.H.S. is a solution. Lesson: general and particular solutions
  6. A shorter route: y=eaxuy = e^{ax}u with u′′=−b2uu'' = -b^2u

    Let u=c1cos⁡bx+c2sin⁡bxu = c_1\cos bx + c_2\sin bx⁠. Then u′′=−b2uu'' = -b^2u⁠, and by the product rule

    y′=eax(au+u′),y′′=eax(a2u+2au′+u′′).\begin{aligned} y' &= e^{ax}(au + u'), \\ y'' &= e^{ax}(a^2u + 2au' + u''). \end{aligned}

    So

    y′′−2ay′+(a2+b2)y=eax[a2u+2au′+u′′−2a2u−2au′+(a2+b2)u]=eax(u′′+b2u)=0.\begin{aligned} &y'' - 2ay' + (a^2 + b^2)y \\ &= e^{ax}\left[a^2u + 2au' + u''\right. \\ &\qquad\left. - 2a^2u - 2au' + (a^2 + b^2)u\right] \\ &= e^{ax}(u'' + b^2u) = 0. \end{aligned}
    This keeps uu packed together instead of expanding it, so the cancellation is visible at once: only u′′+b2uu'' + b^2u survives, and that is 0 because uu is a combination of cos⁡bx\cos bx and sin⁡bx\sin bx⁠. It is the same verification, just organised better; the exam answer above uses it.
    Product rule; (cos⁡bx)′′=−b2cos⁡bx(\cos bx)'' = -b^2\cos bx⁠, (sin⁡bx)′′=−b2sin⁡bx(\sin bx)'' = -b^2\sin bx⁠. Lesson: Examples 19 to 22
  7. Check with numbers

    Take a=1a = 1⁠, b=2b = 2⁠, c1=c2=1c_1 = c_2 = 1⁠: y=ex(cos⁡2x+sin⁡2x)y = e^x(\cos 2x + \sin 2x)⁠, and the equation is y′′−2y′+5y=0y'' - 2y' + 5y = 0⁠. At x=0x = 0⁠, (1), (2) and Step 3 give

    y=c1=1,y′=bc2+ac1=3,y′′=a2c1+2abc2−b2c1=1,\begin{aligned} y &= c_1 = 1, \\ y' &= bc_2 + ac_1 = 3, \\ y'' &= a^2c_1 + 2abc_2 - b^2c_1 = 1, \end{aligned}

    and 1−2⋅3+5⋅1=01 - 2\cdot3 + 5\cdot1 = 0⁠. The numbers in the box below check y′(0)=3y'(0) = 3 and y′′(0)=1y''(0) = 1 directly from values of yy⁠.

    A numerical check catches sign slips in the long algebra: a wrong sign in (2) or in Step 3 would change y′(0)y'(0) or y′′(0)y''(0)⁠, and the difference quotients below would disagree.
    Derivative as a limit of difference quotients (Chapter 5, Section 5.3). Basics: derivatives
Result

Substituting y=c1eaxcos⁡bx+c2eaxsin⁡bxy = c_1e^{ax}\cos bx + c_2e^{ax}\sin bx gives d2ydx2−2adydx+(a2+b2)y=0\frac{d^2y}{dx^2} - 2a\frac{dy}{dx} + (a^2 + b^2)y = 0 for all real xx and all constants c1c_1⁠, c2c_2⁠. Hence the given function is a solution of the given differential equation. (Textbook: verified, L.H.S. =0== 0 = R.H.S.)

Check it with numbers

With y=ex(cos⁡2x+sin⁡2x)y = e^x(\cos 2x + \sin 2x)⁠: y(0)=1y(0) = 1⁠, y(0.001)≈1.0030004978y(0.001) \approx 1.0030004978 and y(−0.001)≈0.9970005022y(-0.001) \approx 0.9970005022⁠. Then

1.0030004978−0.99700050220.002≈3.0000,\begin{aligned} &\frac{1.0030004978 - 0.9970005022}{0.002} \\ &\approx 3.0000, \end{aligned}

which is y′(0)=3y'(0) = 3⁠, and

y(0.001)−2y(0)+y(−0.001)0.0012=0.00000100000.000001≈1.000,\begin{aligned} &\frac{y(0.001) - 2y(0) + y(-0.001)}{0.001^2} \\ &= \frac{0.0000010000}{0.000001} \approx 1.000, \end{aligned}

which is y′′(0)=1y''(0) = 1⁠. So y′′−2y′+5y≈1−6+5=0y'' - 2y' + 5y \approx 1 - 6 + 5 = 0 at x=0x = 0⁠.

Common mistakes
  1. Forgetting the chain-rule factor bb⁠: (cos⁡bx)′=−bsin⁡bx(\cos bx)' = -b\sin bx⁠, not −sin⁡bx-\sin bx⁠.
  2. Forgetting one half of the product rule, usually the aeax[…]ae^{ax}[\ldots] part.
  3. Collecting the wrong terms after substituting; group by sin⁡bx\sin bx and cos⁡bx\cos bx and check each coefficient separately.
  4. Stopping at "it looks like it cancels". Write both coefficients out and show each is 0, then state L.H.S. = R.H.S.
What to take away
  1. To verify a solution: derivatives, substitute, simplify to the right side, conclude in words.
  2. For eax×e^{ax}\times(something), write y=eaxuy = e^{ax}u⁠: y′=eax(au+u′)y' = e^{ax}(au + u')⁠, y′′=eax(a2u+2au′+u′′)y'' = e^{ax}(a^2u + 2au' + u'')⁠.
  3. A function with two arbitrary constants solving a second order equation is the kind of answer a general solution of order 2 has.

Every fact used, and where it comes from

FactUsed inSource
Product ruleSteps 2, 3, 6Chapter 5, Section 5.3 (Basics)
(eax)′=aeax(e^{ax})' = ae^{ax}⁠; (cos⁡bx)′=−bsin⁡bx(\cos bx)' = -b\sin bx⁠; (sin⁡bx)′=bcos⁡bx(\sin bx)' = b\cos bxSteps 2, 3, 6Chapter 5, Sections 5.3.1 and 5.4 (Basics)
Second order derivativeStep 3Chapter 5, Section 5.7 (Basics)
A solution makes L.H.S. = R.H.S.Steps 4, 5Section 9.3 (Lesson)
Derivative as a limit of difference quotientsStep 7Chapter 5, Section 5.3 (Basics)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →