# Solving an IVP for ODE with non-constant coefficients using variation of parameters

I was helping a friend get through his differential equations class and came across this problem from an old test from the previous terms:

Solve $$x^2 y'' - 2y=e^{2x}$$ with initial conditions $$\ y(-1)=y'(-1)=0$$. Use the homogeneous solution $$y_h = c_1 x^{-1} + c_2 x^2$$ to find a particular solution by variation of parameters.

In my solution, I came across $$\int \frac{e^x}{x}dx$$ after a pair of integration-by-parts. Symbolic solvers just give this integral to be $$\text{Ei(x)}$$. Given that this was an exam question and that my differential equations know-how is very rusty, is there another solution that avoids this $$\text{Ei}(x)$$? How should the given question be answered then?

• You can't avoid that integral. There is nothing you can do about it. Oct 27, 2020 at 1:06

$$x^2 y'' - 2y=e^{2x}$$ $$(x^2 y' - 2xy)'=e^{2x}$$ $$x^2 y' - 2xy=\dfrac {e^{2x}}2+C_1$$ $$\left(\dfrac y {x^2}\right)'=\dfrac {e^{2x}}{2x^4}+\dfrac {C_1}{x^4}$$ $$\dfrac y {x^2}=\dfrac 12\int \dfrac {e^{2x}}{x^4}dx+\dfrac {C}{x^3}+C_2$$ $$y(x)=\dfrac {x^2}2\int \dfrac {e^{2x}}{x^4}dx+\dfrac {C}{x}+C_2x^2$$ Whatever method you use to solve the DE the exponential integral will appear in the solution. $$I = \int e^{2x}x^{-4}dx=\dfrac 43 \text {Ei}(2x)-\dfrac 23 \dfrac {e^{2x}}x-\dfrac 13 \dfrac {e^{2x}}{x^2}-\dfrac 13 \dfrac {e^{2x}}{x^3}$$