How do you solve xy'+2y=4x^2 given y(1)=0?
1 Answer
y = x^2 -1/x^2
Explanation:
We have:
xy'+2y=4x^2
Which we can write as:
y'+2/xy=4x \ \ \ \ ...... [1]
We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;
dy/dx + P(x)y=Q(x)
Then the integrating factor is given by;
IF = e^(int P(x) dx)
" " = exp(int \ 2/x \ dx)
" " = exp( 2lnx )
" " = e^( lnx^2 )
" " = x^2
And if we multiply the DE [1] by this Integrating Factor,
y'+2/xy=4x
:. x^2y'+2xy=4x^3
:. d/dx (x^2y) = 4x^3
Which we can directly integrate to get:
int \ d/dx (x^2y) \ dx = int \ 4x^3 \ dx
:. x^2y = x^4 + C
Applying the initial condition,
1*0 = 1 + C => C = -1
Thus the solution is:
\ x^2y = x^4 -1
:. y = x^2 -1/x^2