Variation of parameters with nonconstant coefficients

In my class we learned how to solve DEs using the variation of parameters when the coefficients are constant, we use undetermined coefficients to get two homogeneous solutions then apply the method of variation of parameters to get a particular solution. But I was never taught how to use method of variation of parameters when the coefficients are non-constant. For example

$$x^2y'' -3xy'+3y=12x^4$$

Has solutions $y_1=x$ and $y_2=x^3$.

I found this example online but even it doesn't show how these homogenous solutions were found... But it uses them to find the particular solution.... Which I'm fine with.

How do I find these solutions and is there a general strategy? Thanks!

Variation of parameters does not find the solutions of the homogeneous equation, it just uses them to find a particular solution of the non-homogeneous equation. Various other techniques can be used to find fundamental solutions of the homogeneous equation. For instance, this particular homogeneous equation $$x^2 y'' - 3 x y' + 3 y = 0$$ is an Euler (or Cauchy-Euler, or Euler-Cauchy) equation, so you look for solutions of the form $y = x^r$, and find $x$ and $x^3$.

You can also use the method of reduction of order to find a second solution of the homogeneous equation, given one nontrivial solution.

But there is no completely general strategy to find closed-form solutions for homogeneous second-order linear differential equations with non-constant coefficients. Indeed, there are rather simple equations of this type that do not have nontrivial closed-form solutions, even if you allow the standard special functions. For example, as far as I know $$y'' + y' + x^3 y = 0$$ does not have them.

Euler equations are second order linear homogeneous ODE's of the form like you stated in that example.

Differentiating $x^n$ where $n \neq 0$ decreases the power by one and multiplying by $x$ brings back that power.

So we want to look for solutions of the form

$y = Cx^r$ where we need to find r.

Now if $y = Cx^r$, then we can find $y'$ and $y''$ so we sub that into ODE.

Hence, $r(r-1)Cx^r + arCx^r + bCx^r = 0.$

$\Rightarrow r^2 + (a-1)r + b = 0$

Solve for $r$ may give you $r_1$ and $r_2$, so that we have the solution

$\bbox[5px,border:2px solid #C0A000]{y = cx^{r_1} + cx^{r_2}}$

I don't believe there is a satisfactory completely general method of explicitly solving second-order homogeneous linear ODEs. However, with some additional assumptions on the coefficients of the equation there are some methods that can be tried.

1. Some equations can be transformed into constant coefficient equations via a change of variable.

2. One can try looking for power series solutions. This works best when the leading (i.e. second-order) coefficient is 1 and the remaining coefficients are analytic. It can be used in other circumstances, though you may run into singular solutions.

3. Occasionally, the coefficients are nice enough to allow for an integral transform approach, e.g. Laplace transform, Fourier transform. In ODE theory the Laplace transform is particularly common.

4. If you are given one nonzero solution to the homogeneous equation, there are sometimes things you can do. For example, given a solution $y_1$ you might look for a second solution of the form $y_2 = vy_1$, and solve for the unknown function $v$ (and hope you can find a nonconstant solution). This works best when $y_1$ is nonvanishing. Of course, this is contingent on having one solution already.

Solving second-order linear equations is generally pretty hard. A lot of the theory is for analysing the qualitative behavior of solutions (see e.g. Sturm-Liouville problems), or finding good asymptotic and numerical approximations, rather than looking for explicit solutions.

• "I don't believe there is a satisfactory completely general method of explicitly solving second-order homogeneous linear ODEs." >>> Let me be clear about this comment. There is no general method for explicitly solving second-order homogeneous linear ODEs. A typical example is the Airy equation y''=xy that can not be solved via elementary functions Apr 17 '20 at 9:52

A particular solution $y_p$ to the linear ODE $$y''+p(x)y'+q(x)y=f(x)\qquad (1)$$ is given by $$y_p=C_1(x)y_1+C_2(x)y_2,$$ where $y_1$ and $y_2$ are basis solutions of $$y''+p(x)y'+q(x)y=0,\qquad\quad (2)$$ $C_1(x)$, $C_2(x)$ solutions of $$\begin{cases} C_1'(x)y_1+C'_2(x)y_2=0,\\ C_1'(x)y'_1+C'_2(x)y'_2=f(x). \end{cases}$$ In your case $y_1=x$, $y_2=x^3$, $f(x)=12x^2$. $$\begin{cases} C_1'(x)x+C'_2(x)x^3=0,\\ C_1'(x)+C'_2(x)3x^2=12x^2. \end{cases}$$ $$C'_1(x)=-6x^2,\quad C'_2(x)=6,$$ $$C_1(x)=-2x^3,\quad C_2(x)=6x.$$ $$y_p=C_1(x)y_1+C_2(x)y_2=-2x^3\cdot x+6x\cdot x^3=4x^4.$$ General solution of $x^2y'' -3xy'+3y=12x^4$ is $$y=C_1y_1+C_2y_2+y_p=C_1x+C_2x^3+4x^4.$$