I have three solutions for a non homogeneous, linear, 2nd order D.E

$$y_1(x)=3x−2x^2$$ $$y_2(x)=−2x^2+5xe^x$$ $$y_3(x)=2x−2x^2+3xe^x$$

I want to find the general solution.

I know that the general solution is a combination of the three but with some coefficients, $c_1y_1+c_2y_2+c_3y_3$ such that $c_1+c_2+c_3=1$.

How do i find the $c_1$, $c_2$, and $c_3$ coefficients, in order to calculate the general solution?

  • $\begingroup$ I can't see the differential equation. Please use MathJax $\endgroup$ May 13, 2019 at 21:51
  • 1
    $\begingroup$ The differential equation is not known. $\endgroup$ May 13, 2019 at 22:04
  • 1
    $\begingroup$ Isn’t this convex combination the general solution? Specific values of these coefficients come into play if you’re solving an initial-value or boundary-value problem. $\endgroup$
    – amd
    May 14, 2019 at 0:23
  • 1
    $\begingroup$ You said it yourself that the general solution is just some convex combination $c_1y_1+c_2y_2+c_3y_3$ of the coefficients. So now you just compute that convex combination and it equals $$(3c_1+2c_3)x+(5c_2+3c_3)xe^x -2x^2.$$ Now by renaming $a=3c_1+2c_3$ and $b=5c_2+3c_3$, you see that the general solution is $ax+bxe^x-2x^2$. $\endgroup$
    – shalop
    May 14, 2019 at 8:06
  • 1
    $\begingroup$ @ shalop I am sorry, my mind was stuck. I finally understand. Thank you! $\endgroup$ May 15, 2019 at 16:08

1 Answer 1


You are looking for an ODE on the form : $$y''+f(x)y'+g(x)y+h(x)=0$$ The first known solution is $\quad y_1=3x-2x^2\quad,\quad y'_1=3-4x \quad,\quad y''=-4. \quad$ Putting them into the above ODE leads to a first equation : $$-4+(3-4x)f+(3x-2x^2)g+h=0 \tag 1$$ On the same manner we put the two other known solutions into the PDE. $$(-4+10e^x+5xe^x)+(-4x+5e^x+5xe^x)f+(-2x^2+5xe^x)g+h=0 \tag 2$$ $$(-4+6e^x+3xe^x)+(2-4x+3e^x+3xe^x)f+(2x-2x^2+3xe^x)g+h=0\tag 3$$ The system of three equations $(1)$ , $(2)$ , $(3)$ can be solved for the unknowns $f,g,h$. $$\begin{bmatrix} f &\\ g \\ h \end{bmatrix} = \begin{bmatrix} (3-4x) & (3x-2x^2) & 1 &\\ (-4x+5e^x+5xe^x) & (-2x^2+5xe^x) & 1\\ (2-4x+3e^x+3xe^x) & (2x-2x^2+3xe^x) & 1 \end{bmatrix}^{-1} \begin{bmatrix} 4 \\ 4-10e^x-5xe^x \\ 4-6e^x-3xe^x \end{bmatrix} $$ The result is : $$\begin{bmatrix} f &\\ g \\ h \end{bmatrix} = \begin{bmatrix} -\frac{x+2}{x}\\ \frac{x+2}{x^2}\\ -2x \end{bmatrix}$$ The ODE is : $$ \boxed{y''-\frac{x+2}{x}y'+\frac{x+2}{x^2}y=2x}$$

  • $\begingroup$ Thanks a ton for taking the time to write this, it was super useful. But what is asked is not to find the ODE, but the general solution of the ODE. I gave an upvote to this answer. $\endgroup$ May 14, 2019 at 11:17
  • $\begingroup$ the general solution of the ODE is : $$y=c_1x+c_2xe^x-2x^2$$ If this was only what you wanted, no need for the above troublesome calculus. The form of the general solution can be more easily guessed and then proved by inspection of the three solutions and linear combination of them. See the pertinent comment from Shalop. $\endgroup$
    – JJacquelin
    May 14, 2019 at 12:32
  • $\begingroup$ Thank you very much! $\endgroup$ May 15, 2019 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .