Detailed Explanation
To verify that a function is a solution of a differential equation, we do NOT solve the equation. Instead, we take the given function, find the derivatives that appear in the equation (here the first and second derivatives), and substitute them into the left-hand side. If the left-hand side simplifies to the right-hand side (here 0), the function is indeed a solution. For the function \( y = e^x (a\cos x + b\sin x) \), we must use the product rule of differentiation carefully, because it is a product of \( e^x \) and a trigonometric expression.
Formula Used
Product rule: \( \frac{d}{dx}(uv) = u'v + uv' \). Also \( \frac{d}{dx}(e^x) = e^x \), \( \frac{d}{dx}(\cos x) = -\sin x \), \( \frac{d}{dx}(\sin x) = \cos x \).
Solution
- Step 1: Write down the given function. \[ y = e^x (a\cos x + b\sin x) \] Here \( a \) and \( b \) are arbitrary constants. We need to check whether it satisfies \( \frac{d^2y}{dx^2} - 2\frac{dy}{dx} + 2y = 0 \).
- Step 2: Differentiate \( y \) once using the product rule, treating \( e^x \) and \( (a\cos x + b\sin x) \) as the two factors. \[ \frac{dy}{dx} = e^x (a\cos x + b\sin x) + e^x (-a\sin x + b\cos x) \] Notice the first term is just \( y \). So \[ \frac{dy}{dx} = y + e^x (-a\sin x + b\cos x) \]
- Step 3: Differentiate again to get the second derivative. Differentiate \( \frac{dy}{dx} = y + e^x(-a\sin x + b\cos x) \). \[ \frac{d^2y}{dx^2} = \frac{dy}{dx} + e^x(-a\sin x + b\cos x) + e^x(-a\cos x - b\sin x) \] The term \( e^x(-a\sin x + b\cos x) \) equals \( \frac{dy}{dx} - y \) (from Step 2), and \( e^x(-a\cos x - b\sin x) = -y \). So \[ \frac{d^2y}{dx^2} = \frac{dy}{dx} + \left(\frac{dy}{dx} - y\right) - y \] which gives \[ \frac{d^2y}{dx^2} = 2\frac{dy}{dx} - 2y \]
- Step 4: Substitute into the left-hand side of the differential equation. \[ \frac{d^2y}{dx^2} - 2\frac{dy}{dx} + 2y \] Replace \( \frac{d^2y}{dx^2} \) with \( 2\frac{dy}{dx} - 2y \). \[ = \left(2\frac{dy}{dx} - 2y\right) - 2\frac{dy}{dx} + 2y \]
- Step 5: Simplify the expression. \[ = 2\frac{dy}{dx} - 2y - 2\frac{dy}{dx} + 2y = 0 \] The left-hand side equals the right-hand side, so the equation is satisfied.
Final Answer
Since \( \frac{d^2y}{dx^2} - 2\frac{dy}{dx} + 2y = 0 \) is satisfied, the function \( y = e^x(a\cos x + b\sin x) \) is a solution of the given differential equation.
Common Mistake
A common mistake is forgetting to apply the product rule and differentiating only one factor, for example writing \( \frac{dy}{dx} = e^x(-a\sin x + b\cos x) \) and dropping the \( e^x(a\cos x + b\sin x) \) term. Both factors must be differentiated because \( y \) is a product.