Solve the differential equation \( \frac{d y}{d x}=x e^{-x}-y, y(0)=1 \)
Real Tutor Solution
Answer
Solution
Sign in to Unlock Answers for Free!
A Learning Platform Trusted by Millions of Real Students and Teachers.
Reviewed and approved by the UpStudy tutoring team
Beyond the Answer
To solve the differential equation \( \frac{d y}{d x} = x e^{-x} - y \) with the initial condition \( y(0) = 1 \), we can use the method of integrating factors. The equation can be rewritten as: \[ \frac{d y}{d x} + y = x e^{-x} \] This is a linear first-order differential equation of the form \( \frac{dy}{dx} + P(x)y = Q(x) \), where \( P(x) = 1 \) and \( Q(x) = x e^{-x} \). The integrating factor (\( \mu(x) \)) is given by: \[ \mu(x) = e^{\int P(x) \, dx} = e^{\int 1 \, dx} = e^x \] Multiplying through the differential equation by the integrating factor: \[ e^x \frac{d y}{d x} + e^x y = x \] The left side can be expressed as the derivative of a product: \[ \frac{d}{d x} (e^x y) = x \] Now, we integrate both sides: \[ \int \frac{d}{d x} (e^x y) \, dx = \int x \, dx \] This gives us: \[ e^x y = \frac{x^2}{2} + C \] where \( C \) is the constant of integration. We can now solve for \( y \): \[ y = e^{-x} \left( \frac{x^2}{2} + C \right) \] Now we apply the initial condition \( y(0) = 1 \): \[ 1 = e^{0} \left( \frac{0^2}{2} + C \right) \implies 1 = C \] Thus, \( C = 1 \). The solution becomes: \[ y = e^{-x} \left( \frac{x^2}{2} + 1 \right) \] Finally, we can write the solution to the differential equation: \[ \boxed{y = e^{-x} \left( \frac{x^2}{2} + 1 \right)} \]