A linear first-order differential equation has two solutions: $$y_1(x)=x^2 \\y_2(x)=\frac{1}{x}$$ Determine the differential equation

I did some research and I think I can use the wronskian to determine my original DE but I dont' really get how it works. Can someone show me how it's done? (It would be nice if you could use a different example so I can solve this question myself).

  • $\begingroup$ @copper.hat I am not sure. Can this diff. equation have only one solution? I just checked the question again and I copied it correctly. Our other worksheets have been full of mistakes too so I wouldn't be surprised if this is another mistake $\endgroup$
    – bluemoon
    Nov 26, 2015 at 15:54
  • $\begingroup$ A first order equation has an infinite number of solutions. $\endgroup$ Nov 26, 2015 at 16:10
  • $\begingroup$ @copper.hat The differential equation $y'=y$ has infinitely many solutions and is first order... $\endgroup$
    – Tom-Tom
    Nov 26, 2015 at 16:12
  • 1
    $\begingroup$ @Tom-Tom: I meant linearly independent, since it is linear any multiple will do, of course. In any case, Julian has given a nice answer below. I was incorrectly assuming uniqueness (as implied by some Lipschitz condition, for example). $\endgroup$
    – copper.hat
    Nov 26, 2015 at 16:14
  • 1
    $\begingroup$ @JuliánAguirre: Fuzzy thinking on my part. I was wondering how two solutions could pass through $y=1,x=1$. However $x=1$ is not in the domain of any solution. $\endgroup$
    – copper.hat
    Nov 26, 2015 at 16:43

3 Answers 3


Let $y'=a(x)\,y+f(x)$ be the equation. We have to determine $a$ and $f$. The function $y_1-y_2$ is a solution of the homogeneous equation $y'=a\,y$, that is $$ 2\,x+\frac{1}{x^2}=a(x)\Bigl(x^2-\frac1x\Bigr). $$ From this you find $a$, and then $f$.


  • $\begingroup$ this is the way $\endgroup$
    – kmitov
    Nov 26, 2015 at 16:13
  • $\begingroup$ Cool. Looks so easy, but how did you know that $y_1-y_2$ is a soltuion. Is there some sort of "rule" that says that any linear combination of solutions is also a solution? $\endgroup$
    – bluemoon
    Nov 26, 2015 at 16:13
  • 2
    $\begingroup$ Very nice solution ! (+1) Just note that the left-hand side should be $2x+\frac1{x^2}$. $\endgroup$
    – Tom-Tom
    Nov 26, 2015 at 16:16
  • 2
    $\begingroup$ @bluemoon, subtract $y_2' = a y_2 + f$ from $y_1' = a y_1 + f$ $\endgroup$ Nov 26, 2015 at 16:39
  • $\begingroup$ following Vargas's advice you get $(y_1-y_2)'=a*(y_1-y_2)$ where $y_1-y_2$ fits the homogeneous form of the equation. (without $f(x)$) $\endgroup$
    – Desperado
    Nov 26, 2015 at 16:47

In case of finding the linear second order differential equation for which $\{y_1,y_2\}$ is the basis of solutions, you can follow your first intuition and solve it using the Wronskian.

First you have to check that $W(y_1,y_2)(x) \ne 0$ for any $x$ on the interval definition of your differential equation. Hopefully, $\forall x >0 $ or $x<0$ :
$$W(y_1,y_2)(x) = \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} = \begin{vmatrix} x^2 & x^{-1} \\ 2x & -x^{-2} \end{vmatrix} = - 3 \ne 0$$

That means that the following equation

$$ \begin{vmatrix} y & y_1 & y_2 \\ y' & y_1' & y_2' \\ y'' & y_1'' & y_2'' \end{vmatrix} = 0 = y'' \begin{vmatrix} y_1 & y_2 \\ y_1' & y_2' \end{vmatrix} -y' \begin{vmatrix} y_1 & y_2 \\ y_1'' & y_2'' \end{vmatrix} + y \begin{vmatrix} y_1' & y_2' \\ y_1'' & y_2'' \end{vmatrix} $$

is a true second order differential equation. And you can see that both $y_1$ and $y_2$ are solution to this equation by replacing $y$ by $y_1$ or $y_2$ in the determinant expression.

  • $\begingroup$ 1st order $\subset$ 2nd order..., the highest coefficient=0, implyin that any linear function is a solution of the homogeneous equation. $\endgroup$
    – DVD
    Dec 28, 2015 at 22:29


As the equation is linear, $y=ax^2+(1-a)\dfrac1x$ is a one-parameter general solution, which includes $y_1$ and $y_2$. Eliminate $a$ from the system

$$y=ax^2+\frac{1-a}x\\ y'=2ax-\frac{1-a}{x^2}.$$

You get

$$a=\frac{xy'+y}{3x^2},$$ hence



You must log in to answer this question.

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