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

Exercise 9.3 · Q15: Curve through (0,0)(0, 0) with y′=exsin⁡xy' = e^x\sin x

Exercise 9.3Variables separable, particular solution · Sections 9.3 and 9.4.1
The question

15. Find the equation of a curve passing through the point (0,0)(0, 0) and whose differential equation is y′=exsin⁡xy' = e^x\sin x⁠.

Exam answer

Given dydx=exsin⁡x\frac{dy}{dx} = e^x\sin x⁠. Separating the variables,

dy=exsin⁡x dxdy = e^x\sin x\,dx

Integrating, y=I+Cy = I + C⁠, where I=∫exsin⁡x dxI = \int e^x\sin x\,dx⁠.

Integrating by parts twice, taking sin⁡x\sin x and then cos⁡x\cos x as the first function,

I=exsin⁡x−∫excos⁡x dx=exsin⁡x−excos⁡x−∫exsin⁡x dx=ex(sin⁡x−cos⁡x)−I\begin{aligned} I &= e^x\sin x - \int e^x\cos x\,dx \\ &= e^x\sin x - e^x\cos x \\ &\quad - \int e^x\sin x\,dx \\ &= e^x(\sin x - \cos x) - I \end{aligned} ∴ 2I=ex(sin⁡x−cos⁡x)I=12ex(sin⁡x−cos⁡x)\begin{aligned} \therefore\ 2I &= e^x(\sin x - \cos x) \\ I &= \frac{1}{2}e^x(\sin x - \cos x) \end{aligned} ∴ y=12ex(sin⁡x−cos⁡x)+C…(i)\begin{aligned} \therefore\ y &= \frac{1}{2}e^x(\sin x - \cos x) \\ &\quad + C\quad\ldots(\text{i}) \end{aligned}

The curve passes through (0,0)(0, 0)⁠. Putting x=0x = 0⁠, y=0y = 0 in (i): 0=12(0−1)+C0 = \frac{1}{2}(0 - 1) + C⁠, so C=12C = \frac{1}{2}⁠.

y=12ex(sin⁡x−cos⁡x)+122y=ex(sin⁡x−cos⁡x)+1\begin{aligned} y &= \frac{1}{2}e^x(\sin x - \cos x) + \frac{1}{2} \\ 2y &= e^x(\sin x - \cos x) + 1 \end{aligned}

∴\therefore The curve is 2y−1=ex(sin⁡x−cos⁡x)2y - 1 = e^x(\sin x - \cos x)⁠.

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

The one idea this problem is built on

The slope is given as a function of xx alone, so yy is just the integral of exsin⁡xe^x\sin x⁠. Integrating by parts twice brings the same integral back, and solving for it gives 12ex(sin⁡x−cos⁡x)\frac{1}{2}e^x(\sin x - \cos x)⁠. The point (0,0)(0, 0) then fixes the constant.

Given, to find, and the plan
Given
y′=exsin⁡xy' = e^x\sin x⁠, and the curve passes through (0,0)(0, 0)⁠.
To find
The equation of the curve: the particular solution through (0,0)(0, 0)⁠.
Plan
(1) Separate. (2) Integrate by parts twice and solve for the integral. (3) Write the general solution, one constant CC⁠. (4) Use the point. (5) Check by substituting back, and at the point.

Basics you need

1Variables separable

If dydx=g(x) h(y)\frac{dy}{dx} = g(x)\,h(y) with h(y)≠0h(y) \ne 0⁠, then ∫dyh(y)=∫g(x) dx\int\frac{dy}{h(y)} = \int g(x)\,dx (Section 9.4.1). Here h(y)=1h(y) = 1⁠. Lesson: separate, then integrate

2Integration by parts

∫fg dx=f∫g dx−∫(f′∫g dx)dx\int f g\,dx = f\int g\,dx - \int\left(f'\int g\,dx\right)dx⁠, with ff the first function (Section 7.6). Basics: every method ends with an integral

3Derivatives and integrals used

∫ex dx=ex\int e^x\,dx = e^x⁠; (sin⁡x)′=cos⁡x(\sin x)' = \cos x⁠; (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x⁠.

4A curve through a point

"Passing through (0,0)(0, 0)" is the condition y=0y = 0 when x=0x = 0⁠; it fixes the constant (Section 9.3). Basics: one constant, one condition

Solution

  1. Separate the variables

    y′=dydxy' = \frac{dy}{dx}⁠, so the equation is dydx=exsin⁡x\frac{dy}{dx} = e^x\sin x⁠, of order 1 and degree 1. Multiply by dxdx⁠:

    dy=exsin⁡x dx.dy = e^x\sin x\,dx.
    The right side depends on xx only: g(x)=exsin⁡xg(x) = e^x\sin x⁠, h(y)=1h(y) = 1⁠, so nothing in yy is divided by and no value of yy is lost. exsin⁡xe^x\sin x is defined for every xx⁠, so the solution is valid on the whole real line.
    Section 9.4.1: separate, then integrate. Lesson: separate, then integrate
  2. Integrate by parts, once

    Let I=∫exsin⁡x dxI = \int e^x\sin x\,dx⁠. Take sin⁡x\sin x as the first function and exe^x as the second:

    I=sin⁡x⋅ex−∫cos⁡x⋅ex dx=exsin⁡x−∫excos⁡x dx.\begin{aligned} I &= \sin x\cdot e^x - \int\cos x\cdot e^x\,dx \\ &= e^x\sin x - \int e^x\cos x\,dx. \end{aligned}
    The rule: first function times the integral of the second, minus the integral of (derivative of the first times the integral of the second). The integral of exe^x is exe^x and the derivative of sin⁡x\sin x is cos⁡x\cos x⁠. The new integral looks no simpler, but one more round brings II back.
    Section 7.6, integration by parts. Basics: every method ends with an integral
  3. Integrate by parts again, and solve for II

    In ∫excos⁡x dx\int e^x\cos x\,dx take cos⁡x\cos x as the first function:

    ∫excos⁡x dx=excos⁡x+∫exsin⁡x dx=excos⁡x+I.\begin{aligned} \int e^x\cos x\,dx &= e^x\cos x \\ &\quad + \int e^x\sin x\,dx \\ &= e^x\cos x + I. \end{aligned}

    So

    I=exsin⁡x−excos⁡x−I2I=ex(sin⁡x−cos⁡x)I=12ex(sin⁡x−cos⁡x).\begin{aligned} I &= e^x\sin x - e^x\cos x - I \\ 2I &= e^x(\sin x - \cos x) \\ I &= \frac{1}{2}e^x(\sin x - \cos x). \end{aligned}
    The derivative of cos⁡x\cos x is −sin⁡x-\sin x⁠, and minus a minus gives +∫exsin⁡x dx+\int e^x\sin x\,dx⁠, which is II again. Moving −I-I across gives 2I2I⁠. Keeping the trigonometric function as the first function both times is what makes II return with the opposite sign. The book works the same integral taking exe^x first; the result is the same.
    Section 7.6; the book computes ∫exsin⁡x dx\int e^x\sin x\,dx in Chapter 7, Example 21. Basics: every method ends with an integral
  4. The general solution, then the point

    y=12ex(sin⁡x−cos⁡x)+C.y = \frac{1}{2}e^x(\sin x - \cos x) + C.

    The curve passes through (0,0)(0, 0)⁠: put x=0x = 0⁠, y=0y = 0⁠:

    0=12e0(sin⁡0−cos⁡0)+C=−12+C  ⇒  C=12.\begin{aligned} 0 &= \frac{1}{2}e^0(\sin 0 - \cos 0) + C \\ &= -\frac{1}{2} + C \;\Rightarrow\; C = \frac{1}{2}. \end{aligned}

    So y=12ex(sin⁡x−cos⁡x)+12y = \frac{1}{2}e^x(\sin x - \cos x) + \frac{1}{2}⁠. Multiplying by 2 and moving the 1 across:

    2y−1=ex(sin⁡x−cos⁡x).2y - 1 = e^x(\sin x - \cos x).
    The constants from both sides of Step 1, and from the integration by parts, all combine into one CC⁠: one constant for a first order equation. e0=1e^0 = 1⁠, sin⁡0=0\sin 0 = 0⁠, cos⁡0=1\cos 0 = 1⁠. The last form clears the fractions and matches the textbook's answer.
    Section 9.3: a particular solution gives the constant a value. Basics: one constant, one condition
  5. Check: substitute back, and at the point

    Differentiate 2y−1=ex(sin⁡x−cos⁡x)2y - 1 = e^x(\sin x - \cos x) by the product rule:

    2y′=ex(sin⁡x−cos⁡x)+ex(cos⁡x+sin⁡x)=2exsin⁡x,\begin{aligned} 2y' &= e^x(\sin x - \cos x) \\ &\quad + e^x(\cos x + \sin x) \\ &= 2e^x\sin x, \end{aligned}

    so y′=exsin⁡xy' = e^x\sin x⁠. At x=0x = 0⁠: 2y−1=1⋅(0−1)=−12y - 1 = 1\cdot(0 - 1) = -1⁠, so y=0y = 0⁠.

    Both the equation and the point check out, so this is the curve asked for (Section 9.3). The cos⁡x\cos x terms cancel, which is the same cancellation that made II come back in Step 3.
    Product rule (Chapter 5). Basics: y′ is the slope
Result

The curve is 2y−1=ex(sin⁡x−cos⁡x)2y - 1 = e^x(\sin x - \cos x)⁠, that is, y=12ex(sin⁡x−cos⁡x)+12y = \frac{1}{2}e^x(\sin x - \cos x) + \frac{1}{2}⁠, for every real xx⁠. (Textbook answer: 2y−1=ex(sin⁡x−cos⁡x)2y - 1 = e^x(\sin x - \cos x)⁠.)

Check it with numbers

At x=1x = 1⁠: y=12e(sin⁡1−cos⁡1)+12≈0.9093307y = \frac{1}{2}e(\sin 1 - \cos 1) + \frac{1}{2} \approx 0.9093307⁠, and the equation gives the slope esin⁡1≈2.2873553e\sin 1 \approx 2.2873553⁠.

The curve itself: y(1.001)≈0.9116199y(1.001) \approx 0.9116199 and y(0.999)≈0.9070452y(0.999) \approx 0.9070452⁠, so

0.9116199−0.90704520.002≈2.2874.\begin{aligned} &\frac{0.9116199 - 0.9070452}{0.002} \\ &\approx 2.2874. \end{aligned}
Common mistakes
  1. Switching the first function in the second round (taking exe^x first after taking sin⁡x\sin x first). That undoes the first step and gives I=II = I⁠.
  2. A sign slip with (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x⁠. The second round gives +∫exsin⁡x dx+\int e^x\sin x\,dx⁠, so −I-I appears in the line for II⁠.
  3. Forgetting CC before using the point, or using e0=0e^0 = 0⁠. Here C=12C = \frac{1}{2}⁠, from e0cos⁡0=1e^0\cos 0 = 1⁠.
What to take away
  1. When y′y' is a function of xx alone, the curve is y=∫y′ dx+Cy = \int y'\,dx + C⁠, and the point fixes CC⁠.
  2. ∫exsin⁡x dx\int e^x\sin x\,dx returns after two rounds of parts: solve for it.
  3. Differentiate the final answer to check it.

Every fact used, and where it comes from

FactUsed inSource
Variables separable: separate, then integrateStep 1Section 9.4.1 (Lesson)
Integration by partsSteps 2, 3Section 7.6 (Basics)
∫exsin⁡x dx=12ex(sin⁡x−cos⁡x)+C\int e^x\sin x\,dx = \frac{1}{2}e^x(\sin x - \cos x) + CStep 3Chapter 7, Example 21
General solution has an arbitrary constant; a particular solution gives it a valueStep 4Section 9.3 (Basics)
Product rule; a solution makes L.H.S. = R.H.S.Step 5Chapter 5; Section 9.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 →