2

so I am new to differential equations but I do not get something:

I am given initial value y(0)=1 and following equation: $$(1+x^3)y' + 3x^2y = cos x$$
Here I know I have to undo product rule so I get that: $$\frac{d}{dx}(1+x^3)y = cos x$$ I understand that I have to add d/dx to mean it was differentiated previously, and by the fundamental theorem of calculus when I integrate it I just get $$(1+x^3)y=sinx$$ With right side bounds being easy as from 0 to x, so right side equals to just sin x, but the left side I THINK I need to integrate with respect to y(x), from 1 to y, so I should get left-hand side equal to: $$(1+x^3)y - (1+x^3)$$ But the correct answer is: $$\frac{1+sinx}{1+x^3}$$ So I know I also need to make the x on the left side equal to 0. Why? Shouldn't I only consider the y on the left side when integrating?

1 Answers1

2

You are integrating both sides w.r.t. $x$.

$$\int \dfrac d {dx} [(1+x^3)y] dx = \int \cos(x) dx$$

$$ (1+x^3)y = \sin(x) + C$$

$$ y = \dfrac{\sin(x) + C}{1+x^3}$$

Now use the assumption $y(0)=1$ to obtain $C=1$.

David P
  • 12,320