Initial Value Problem Differential Equation Question A question states
$y = y (x)$ which means that the variable $y$ depends on $x$. Now an initial condition is given lets say $y(0) = 10$,
Now when asking to solve the differential equation
$dy/dx + y \sin(x) = \sin^3(x)$ , how does integrating the middle term work?
Here $y$ cannot be taken as constant because question stated $y = y(x)$. I just want to know how to solve it and when to follow which rule.
 A: "How does integrating the middle term work?"
The short answer is that it doesn't, at least not right away. The usual strategy for a linear ODE such as this is to introduce what's appropriately called the "integrating factor" such that the left side can be condensed into the derivative of a product, then integrate.
In this case, we want to choose $\mu(x)$ such that
$$\mu\frac{\mathrm dy}{\mathrm dx}+\mu\sin(x)y=\frac{\mathrm d(\mu y)}{\mathrm dx}=\mu\sin^3(x)$$
By the product rule, this means
$$\frac{\mathrm d\mu}{\mathrm dx}=\mu \sin(x)$$
which is separable and easy to solve. Can you take it from here?
A: $$ y' + sin(x) \ y = sin^3(x) $$
$$ \mu(x) = exp \left( \int sin(x)dx  \right)  = e^{-cos(x)} $$
$$ e^{-cos(x)} \ y' + sin(x) \ e^{-cos(x)} \ y \ = e^{-cos(x)} \ sin^3(x)   $$
$$ D_x( e^{-cos(x)} \ y) = e^{-cos(x)} \ sin^3(x) $$
$$ \int D_x( e^{-cos(x)} \ y) \ dx = \int e^{-cos(x)} \ sin^3(x) \ dx$$
$$  e^{-cos(x)} \ y = - e^{-cos(x)} \ (cos(x)+1)^2 + C  $$
$$ y(x) = -(cos(x)+1)^2 + C \ e^{cos(x)} $$
