Subjects differential equations

Differential Equation 1 Cf3E6C

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem:** Solve the differential equation $$x\,dx + y e^{-x} dy = 0$$ with initial condition $$y(0) = 1$$. 2. **Formula and rules:** This is a separable differential equation. We aim to write it in the form $$M(x,y) dx + N(x,y) dy = 0$$ and check if it can be separated or integrated directly. 3. **Rewrite the equation:** $$x\,dx + y e^{-x} dy = 0$$ 4. **Separate variables:** Rearranged: $$y e^{-x} dy = -x dx$$ Divide both sides by $$y$$ and multiply both sides by $$e^x$$: $$e^x y dy = -x e^x dx$$ 5. **Integrate both sides:** $$\int y e^x dy = -\int x e^x dx$$ Note: The left side integral is with respect to $$y$$, but $$e^x$$ is constant in $$y$$, so: $$e^x \int y dy = -\int x e^x dx$$ 6. **Integrate left side:** $$e^x \frac{y^2}{2} = -\int x e^x dx + C$$ 7. **Integrate right side:** Use integration by parts for $$\int x e^x dx$$: Let $$u = x$$, $$dv = e^x dx$$, then $$du = dx$$, $$v = e^x$$. $$\int x e^x dx = x e^x - \int e^x dx = x e^x - e^x + C = e^x (x - 1) + C$$ 8. **Substitute back:** $$e^x \frac{y^2}{2} = - e^x (x - 1) + C$$ 9. **Divide both sides by $$e^x$$:** $$\frac{y^2}{2} = - (x - 1) + C e^{-x}$$ Intermediate step with cancellation: $$\frac{y^2}{\cancel{2}} = - (x - 1) + C e^{-x}$$ 10. **Simplify:** $$\frac{y^2}{2} = 1 - x + C e^{-x}$$ 11. **Apply initial condition $$y(0) = 1$$:** $$\frac{1^2}{2} = 1 - 0 + C e^{0} \Rightarrow \frac{1}{2} = 1 + C$$ 12. **Solve for $$C$$:** $$C = \frac{1}{2} - 1 = -\frac{1}{2}$$ 13. **Final solution:** $$\frac{y^2}{2} = 1 - x - \frac{1}{2} e^{-x}$$ Or equivalently: $$y^2 = 2 - 2x - e^{-x}$$ **Answer:** $$y^2 = 2 - 2x - e^{-x}$$ with $$y(0) = 1$$.