Subjects differential equations

Sec X Ode 0Dc3D2

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

Search Solutions

Sec X Ode 0Dc3D2


1. **Problem:** Solve the differential equation $$\sec x \frac{dy}{dx} = y^2 - y$$ with initial condition $$y(0) = 4$$. 2. **Rewrite the equation:** Multiply both sides by $$\cos x$$ to isolate $$\frac{dy}{dx}$$: $$\frac{dy}{dx} = (y^2 - y) \cos x$$. 3. **Separate variables:** Write as $$\frac{dy}{y^2 - y} = \cos x \, dx$$. 4. **Factor denominator:** $$y^2 - y = y(y-1)$$, so $$\frac{1}{y(y-1)} = \frac{A}{y} + \frac{B}{y-1}$$. 5. **Partial fractions:** Solve for $$A$$ and $$B$$: $$1 = A(y-1) + By$$. Set $$y=0$$: $$1 = A(-1) \Rightarrow A = -1$$. Set $$y=1$$: $$1 = B(1) \Rightarrow B = 1$$. 6. **Rewrite integral:** $$\int \frac{dy}{y(y-1)} = \int \left(-\frac{1}{y} + \frac{1}{y-1}\right) dy = \int \cos x \, dx$$. 7. **Integrate both sides:** $$-\ln|y| + \ln|y-1| = \sin x + C$$. 8. **Combine logarithms:** $$\ln \left| \frac{y-1}{y} \right| = \sin x + C$$. 9. **Exponentiate:** $$\left| \frac{y-1}{y} \right| = e^{\sin x + C} = Ae^{\sin x}$$ where $$A = e^C > 0$$. 10. **Solve for $$y$$:** $$\frac{y-1}{y} = Ae^{\sin x} \Rightarrow 1 - \frac{1}{y} = Ae^{\sin x} \Rightarrow \frac{1}{y} = 1 - Ae^{\sin x}$$. 11. **Therefore:** $$y = \frac{1}{1 - Ae^{\sin x}}$$. 12. **Apply initial condition $$y(0) = 4$$:** $$y(0) = \frac{1}{1 - A e^{\sin 0}} = \frac{1}{1 - A} = 4$$. 13. **Solve for $$A$$:** $$1 - A = \frac{1}{4} \Rightarrow A = 1 - \frac{1}{4} = \frac{3}{4}$$. 14. **Final solution:** $$\boxed{y = \frac{1}{1 - \frac{3}{4} e^{\sin x}}}$$. This solution satisfies the initial condition and the differential equation.