SOLVER7 Study. Nothing Else.
Chapter 9 Examples Q14

Find the general solution of the differential equation \(\dfrac{dy}{dx}-y=cos\ x.\)

CBSE Class 12 Maths · Differential Equations

Solution

👶 Simple Explanation

Simple Explanation

Imagine you have a messy room and you want to tidy it using a magic cleaning cloth. The differential equation is like the messy room. We find a special magic cloth called the integrating factor, which is \( e^{-x} \). Multiplying both sides by it makes everything neat and easy to combine. After that, we just collect all the pieces together, like picking up toys off the floor. The final tidy result tells us exactly what \( y \) looks like in terms of \( x \).

Answer: \[ y = \frac{1}{2}\left( \sin x - \cos x \right) + C e^{x} \]

📖 General Solution of dy/dx - y = cos x

Detailed Explanation

A first-order linear differential equation has the standard form \( \dfrac{dy}{dx} + Py = Q \), where \( P \) and \( Q \) are functions of \( x \) (or constants). To solve it, we multiply the whole equation by a special factor called the integrating factor (I.F.), given by \( e^{\int P \, dx} \). Multiplying by this factor turns the left-hand side into the derivative of a product, which makes it easy to integrate. Here the equation \( \dfrac{dy}{dx} - y = \cos x \) is already linear, so we just identify \( P \) and \( Q \) and apply the method.

Formula Used

For \( \dfrac{dy}{dx} + Py = Q \), the integrating factor is \( \text{I.F.} = e^{\int P \, dx} \), and the solution is \( y \cdot (\text{I.F.}) = \int Q \cdot (\text{I.F.}) \, dx + C \).

Solution

  1. Step 1: Compare the given equation with the standard linear form. We have \( \dfrac{dy}{dx} - y = \cos x \), so \( P = -1 \) and \( Q = \cos x \).
  2. Step 2: Find the integrating factor. \[ \text{I.F.} = e^{\int P \, dx} = e^{\int -1 \, dx} = e^{-x} \]
  3. Step 3: Write the solution using the standard result. The general solution is \[ y \cdot e^{-x} = \int \cos x \cdot e^{-x} \, dx + C \] So we now need to evaluate the integral \( \int e^{-x} \cos x \, dx \).
  4. Step 4: Evaluate \( \int e^{-x} \cos x \, dx \) using the standard result \[ \int e^{ax} \cos bx \, dx = \frac{e^{ax}}{a^2 + b^2}\left( a \cos bx + b \sin bx \right) + C \] Here \( a = -1 \) and \( b = 1 \), so \( a^2 + b^2 = 2 \). This gives \[ \int e^{-x} \cos x \, dx = \frac{e^{-x}}{2}\left( -\cos x + \sin x \right) + C \]
  5. Step 5: Substitute this result back into the solution. \[ y \, e^{-x} = \frac{e^{-x}}{2}\left( \sin x - \cos x \right) + C \]
  6. Step 6: Multiply throughout by \( e^{x} \) to make \( y \) the subject. \[ y = \frac{1}{2}\left( \sin x - \cos x \right) + C e^{x} \]

Final Answer

\[ y = \frac{1}{2}\left( \sin x - \cos x \right) + C e^{x} \]

Common Mistake

A common mistake is using the wrong sign for \( P \). Since the equation is \( \dfrac{dy}{dx} - y = \cos x \), we must take \( P = -1 \), giving \( \text{I.F.} = e^{-x} \). Students often carelessly write \( P = 1 \) and get \( e^{x} \), which leads to a completely wrong solution.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Identify P and Q from the standard form: Rewrite the given equation \( \frac{dy}{dx} - y = \cos x \) and compare it with the standard form \( \frac{dy}{dx} + Py = Q \). Matching coefficients gives \( P = -1 \) and \( Q = \cos x \). — Reason: We must express the equation in standard linear form before applying the integrating factor method, so that P and Q are clearly identified.
  2. Step 2: Compute the Integrating Factor: Calculate the integrating factor: \[ \text{I.F.} = e^{\int P \, dx} = e^{\int (-1) \, dx} = e^{-x} \] — Reason: The integrating factor is the multiplier that turns the left-hand side of the equation into the derivative of a product, making the equation integrable.
  3. Step 3: Write the General Solution Formula: Multiply both sides of the equation by the integrating factor and apply the solution formula. The general solution takes the form \[ y \cdot e^{-x} = \int \cos x \cdot e^{-x} \, dx + C \] — Reason: After multiplying by the I.F., the left-hand side becomes \( \frac{d}{dx}(y \cdot e^{-x}) \), so integrating both sides directly gives this relation.
  4. Step 4: Evaluate the Integral on the Right-Hand Side: Use the standard result \[ \int e^{ax} \cos bx \, dx = \frac{e^{ax}}{a^2 + b^2}(a \cos bx + b \sin bx) + C \] Here \( a = -1 \) and \( b = 1 \), so \( a^2 + b^2 = 1 + 1 = 2 \). Substituting: \[ \int e^{-x} \cos x \, dx = \frac{e^{-x}}{2}(-1 \cdot \cos x + 1 \cdot \sin x) = \frac{e^{-x}}{2}(\sin x - \cos x) \] — Reason: This standard formula saves us from repeated integration by parts, and it is valid for any constants \( a \) and \( b \).
  5. Step 5: Substitute and Simplify: Substituting the evaluated integral back: \[ y \cdot e^{-x} = \frac{e^{-x}}{2}(\sin x - \cos x) + C \] Now divide every term by \( e^{-x} \) (equivalently, multiply through by \( e^{x} \)) to isolate \( y \): \[ y = \frac{1}{2}(\sin x - \cos x) + C e^{x} \] — Reason: Dividing by the integrating factor \( e^{-x} \) gives the explicit solution for \( y \) in terms of \( x \), which is the required general solution.

Final Answer

\[ y = \frac{1}{2}\left( \sin x - \cos x \right) + C e^{x} \]

Common Mistake

One common mistake: Students often forget to flip the sign of P when reading off the integrating factor. Here the equation is \( \frac{dy}{dx} - y = \cos x \), so \( P = -1 \) (not \( +1 \)), giving I.F. \( = e^{-x} \) (not \( e^{x} \)). Using the wrong sign for P leads to an incorrect integrating factor and a completely wrong solution.

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Given: \\ \(\dfrac{dy}{dx} - y = \cos x\), so \(P = -1\), \(Q = \cos x\). \\ I.F. \(= e^{\int -1 \\, dx} = e^{-x}\)
  2. Step 2: General solution: \[y \cdot e^{-x} = \int e^{-x} \cos x \\, dx + C\]
  3. Step 3: Using \(\displaystyle\int e^{ax}\cos bx\\,dx = \frac{e^{ax}}{a^2+b^2}(a\cos bx + b\sin bx)\) with \(a=-1,\\,b=1\): \[\int e^{-x}\cos x\\,dx = \frac{e^{-x}}{2}(-\cos x + \sin x)\]
  4. Step 4: Substituting and multiplying both sides by \(e^{x}\): \[y = \frac{1}{2}(\sin x - \cos x) + Ce^{x}\]

Answer: \[ y = \frac{1}{2}\left( \sin x - \cos x \right) + C e^{x} \]

➕ More Examples

More Examples

Example 1

Question: Find the general solution of the differential equation \(\frac{dy}{dx} + 2y = \sin x\).

Solution: Step 1: The equation is already in standard linear form \(\frac{dy}{dx} + P(x)\,y = Q(x)\) with \(P(x) = 2\) and \(Q(x) = \sin x\). Step 2: Compute the integrating factor. \[\text{IF} = e^{\int 2\,dx} = e^{2x}\] Step 3: Multiply both sides by \(e^{2x}\): \[e^{2x}\frac{dy}{dx} + 2e^{2x}y = e^{2x}\sin x\] Step 4: The left side is an exact derivative: \[\frac{d}{dx}\left(y\,e^{2x}\right) = e^{2x}\sin x\] Integrate both sides with respect to \(x\): \[y\,e^{2x} = \int e^{2x}\sin x\,dx + C\] Step 5: Evaluate \(\int e^{2x}\sin x\,dx\) using integration by parts twice. Let \(I = \int e^{2x}\sin x\,dx\). Taking \(u = \sin x\) and \(dv = e^{2x}\,dx\): \[I = \frac{e^{2x}\sin x}{2} - \int \frac{e^{2x}\cos x}{2}\,dx\] Apply integration by parts again to \(\int e^{2x}\cos x\,dx\), with \(u = \cos x\) and \(dv = e^{2x}\,dx\): \[\int e^{2x}\cos x\,dx = \frac{e^{2x}\cos x}{2} + \int \frac{e^{2x}\sin x}{2}\,dx = \frac{e^{2x}\cos x}{2} + \frac{I}{2}\] Substituting back: \[I = \frac{e^{2x}\sin x}{2} - \frac{1}{2}\left(\frac{e^{2x}\cos x}{2} + \frac{I}{2}\right)\] \[I = \frac{e^{2x}\sin x}{2} - \frac{e^{2x}\cos x}{4} - \frac{I}{4}\] \[I + \frac{I}{4} = \frac{e^{2x}\sin x}{2} - \frac{e^{2x}\cos x}{4}\] \[\frac{5I}{4} = \frac{e^{2x}(2\sin x - \cos x)}{4}\] \[I = \frac{e^{2x}(2\sin x - \cos x)}{5}\] Step 6: Substituting back: \[y\,e^{2x} = \frac{e^{2x}(2\sin x - \cos x)}{5} + C\] Divide throughout by \(e^{2x}\): \[y = \frac{2\sin x - \cos x}{5} + C\,e^{-2x}\]

Answer: \(y = \dfrac{2\sin x - \cos x}{5} + C\,e^{-2x}\)

Example 2

Question: Find the general solution of the differential equation \(\frac{dy}{dx} - 3y = e^{2x}\).

Solution: Step 1: The equation is in standard linear form with \(P(x) = -3\) and \(Q(x) = e^{2x}\). Step 2: Compute the integrating factor. \[\text{IF} = e^{\int (-3)\,dx} = e^{-3x}\] Step 3: Multiply both sides by \(e^{-3x}\): \[e^{-3x}\frac{dy}{dx} - 3e^{-3x}y = e^{2x}\cdot e^{-3x}\] \[e^{-3x}\frac{dy}{dx} - 3e^{-3x}y = e^{-x}\] Step 4: The left side is an exact derivative: \[\frac{d}{dx}\left(y\,e^{-3x}\right) = e^{-x}\] Integrate both sides with respect to \(x\): \[y\,e^{-3x} = \int e^{-x}\,dx + C\] Step 5: Evaluate the integral: \[\int e^{-x}\,dx = -e^{-x} + C\] So: \[y\,e^{-3x} = -e^{-x} + C\] Step 6: Divide throughout by \(e^{-3x}\) (i.e., multiply by \(e^{3x}\)): \[y = -e^{-x}\cdot e^{3x} + C\,e^{3x}\] \[y = -e^{2x} + C\,e^{3x}\]

Answer: \(y = -e^{2x} + C\,e^{3x}\)

🎯 Try a Similar Question

Try a Similar Question

Question: Find the general solution of the differential equation \[ \frac{dy}{dx} + y = \sin x \]

Solution

  1. Step 1: Identify the standard form: The given equation is \( \frac{dy}{dx} + y = \sin x \). Comparing with \( \frac{dy}{dx} + P(x)\,y = Q(x) \), we identify \( P(x) = 1 \) and \( Q(x) = \sin x \).
  2. Step 2: Find the Integrating Factor: The integrating factor is \[ \text{IF} = e^{\int P(x)\,dx} = e^{\int 1\,dx} = e^{x} \]
  3. Step 3: Multiply both sides by the Integrating Factor: Multiplying the entire differential equation by \( e^{x} \): \[ e^{x}\frac{dy}{dx} + e^{x}\,y = e^{x}\sin x \] The left-hand side is the derivative of the product \( y\,e^{x} \), so: \[ \frac{d}{dx}\left(y\,e^{x}\right) = e^{x}\sin x \]
  4. Step 4: Integrate both sides: Integrating both sides with respect to \( x \): \[ y\,e^{x} = \int e^{x}\sin x\,dx + C \] We evaluate \( I = \int e^{x}\sin x\,dx \) using integration by parts twice. First application (taking \( u = \sin x \), \( dv = e^{x}\,dx \)): \[ I = e^{x}\sin x - \int e^{x}\cos x\,dx \] Second application on \( \int e^{x}\cos x\,dx \) (taking \( u = \cos x \), \( dv = e^{x}\,dx \)): \[ \int e^{x}\cos x\,dx = e^{x}\cos x + \int e^{x}\sin x\,dx = e^{x}\cos x + I \] Substituting back: \[ I = e^{x}\sin x - e^{x}\cos x - I \]
  5. Step 5: Solve for the integral I: Bringing \( I \) to one side: \[ 2I = e^{x}\sin x - e^{x}\cos x \] Therefore: \[ I = \frac{e^{x}(\sin x - \cos x)}{2} \]
  6. Step 6: Write the general solution: Substituting back: \[ y\,e^{x} = \frac{e^{x}(\sin x - \cos x)}{2} + C \] Dividing both sides by \( e^{x} \): \[ y = \frac{\sin x - \cos x}{2} + C\,e^{-x} \]

Answer: \[ y = \frac{1}{2}\left(\sin x - \cos x\right) + C\,e^{-x} \]

Everything you get with Solver7

More questions in Differential Equations

Chapter 9 Examples Q1(i) 65/2/1 2022 / Section A Q1 Chapter 9 Examples Q1(ii) 65/2/2 2023 / Section A Q2 Chapter 9 Examples Q1(iii) 65/2/2 2023 / Section A Q3 Chapter 9 Examples Q2 Chapter 9 Examples Q3 Chapter 9 Examples Q4 Chapter 9 Examples Q5 65/1/1 2023 / Section A Q7 65/2/1 2024 / Section A Q7 65/3/1 2024 / Section A Q7 65/4/1 2022 / Section A Q5 Chapter 9 Examples Q6 65/1/1 2024 / Section A Q8 65/3/1 2023 / Section A Q8 Chapter 9 Examples Q7 65/3/1 2023 / Section A Q9 65/4/2 2024 / Section A Q9 Chapter 9 Examples Q8 65(B) 2026 / Section A Q10 65/4/1 2023 / Section A Q10 Chapter 9 Examples Q9 65(B) 2026 / Section A Q11 65/1/1 2026 / Section A Q11 65/2/1 2022 / Section B Q9 65/4/1 2023 / Section A Q11 Chapter 9 Examples Q10 65/1/1 2026 / Section A Q12 65/4/1 2026 / Section A Q12 Chapter 9 Examples Q11 65/3/1 2026 / Section A Q13 65/4/1 2026 / Section A Q13 65/4/2 2024 / Section A Q13 65/5/1 2026 / Section A Q13 Chapter 9 Examples Q12 65/1/1 2024 / Section A Q14 65/2/1 2024 / Section A Q14 65/5/1 2026 / Section A Q14 Chapter 9 Examples Q13 65/1/1 2023 / Section A Q15 65/2/3 2026 / Section A Q15 65/2/3 2026 / Section A Q16 65/4/1 2022 / Section C Q12(a) Chapter 9 Examples Q15 65/4/1 2022 / Section C Q12(b) Chapter 9 Examples Q16 Chapter 9 Examples Q17 65/3/1 2026 / Section A Q19 Chapter 9 Examples Q18 Chapter 9 Miscellaneous Examples Q19 Chapter 9 Miscellaneous Examples Q20 Chapter 9 Miscellaneous Examples Q21 Chapter 9 Miscellaneous Examples Q22 Exercise 9.1 Q1 Exercise 9.1 Q2 Exercise 9.1 Q3 Exercise 9.1 Q4 65/3/1 2023 / Section C Q26(a)