How can I find a solution to an initial value problem for which u' in the variation of parameters method cannot be integrated?

597 Views Asked by At

I need to find a solution to the IVP $$y'+2y=xe^{-x^2}, y(2)=1$$ I am trying to use the variation of parameters method to find the solution, so I have solved the complementary equation $$y'+2y=0$$ to get $y_1=e^{-2x}$. Now, in order to get the general solution, I need to find $u$, such that $$u'=\frac{xe^{-x^2}}{e^{-2x}}=xe^{2x-x^2}$$ But I cannot integrate this. So currently, I am stuck representing my solution as $$y=(e^{-2x})\int{xe^{2x-x^2}}dx$$ I don't know how to use this to solve the initial value problem. Is there a way for me to show the solution implicitly?

2

There are 2 best solutions below

4
On BEST ANSWER

Hint:$$\int{xe^{2x-x^2}}dx =-\frac{1}{2}e\sqrt{\pi }\ \mathrm{erf}\!\left( 1-x \right)-\frac{1}{2}{{e}^{2x-{{x}^{2}}}}$$

where $\mathrm{erf}(x)$ is the error function

2
On

You can also write the solution as a definite integral

$$ y(x) = e^{-2x} \left[\int_2^x te^{2t-t^2}dt + C\right] $$

Then $y(2) = Ce^{-4} = 1$ gives $C = e^{4}$