# Is this ODE separable?

I'm preparing for the final in my ODE course by reviewing some past exams and I found this problem.

Solve the following equation by the separation of variables method.

$$2tx\frac{dx}{dt}+(t^2-x^2)=0$$

I've learned that separable equations must be of the form

$$\frac{dy}{dx}=g(x)h(y)$$

I've tried and failed to get the problem into the form of the product of a function of $x$ and a function of $t$. I can rearrange it to get

$$\frac{dx}{dt}=\frac{1}{2}\left(\frac{x}{t}-\frac{t}{x}\right)$$

Can someone please show me how to solve this equation using the separation of variables method?

• In my opinion, instead of "seperable" right off the bat I'd say it's homogeneous. This is, it can be written in the form $dx/dt = f(x/t)$. By an adequate change of variables of course (as in the answer), it becomes seperable. If they haven't taught you about homogeneous equations I'd definitely suggest learning about them! – GPerez Jun 17 '15 at 22:03
• @GPerez Thanks for the suggestion I will look for more information on homogeneous equations – Devin Crossman Jun 17 '15 at 22:22
• Glad to help. Just be careful, the term is also used to specify certain linear equations where the LHS is $0$. These aren't what you're looking for. – GPerez Jun 17 '15 at 22:25
• @GPerez: I didn't know homogeneous had two meanings, thanks for that. – user541686 Jun 18 '15 at 4:22
• You can in fact prove that any such homogeneous differential equation as given by GPerez will become separable after the substitution $x = vt$, because $f(v) = \frac{dx}{dt} = \frac{dv}{dt} t + v$. Note however that you made a serious mistake (also found in many textbooks); some of your steps may cause a division by zero. I gave a complete example at matheducators.stackexchange.com/a/7984/1550. – user21820 Jun 18 '15 at 4:55

Let $v = x/t$ then $x = tv$ and $x' = v + tv'$. Hence your equation may be rewritten as

$$v + tv' = {1 \over 2}\left(v - {1\over v}\right)$$

or

$${dv \over dt} = -{1 \over t}\cdot {v^2 + 1 \over 2v}$$

This is separable.

• I don't know how you did that so fast! wow!. I am still struggling to change your first equation into the second but I see how the second is separable. I will keep at it and hopefully I will get there. – Devin Crossman Jun 17 '15 at 22:21
• ah.. finally got it.. I made a silly mistake taking $v+tv'$ as $(v+t)v'$ once I noticed that it was easy. Thanks for your help! – Devin Crossman Jun 17 '15 at 22:57
• See my comment under the question. In this case, no solution is missed out because of the nature of this particular differential equation but in general there may be a bifurcation at points where you have division by zero in your method. – user21820 Jun 18 '15 at 5:32

Same solution as Simon S, but with easier motivation (IMO).

The part that is causing this to not be seperable is $(t^2-x^2)$. If we consider $x = t y$ then this part will become $t^2(1-y^2)$ which is seperable.

So using $x = t y$, and $x' = t y' + y$ into the first equation we get

$$2 t ( t y ) ( t y' +y ) + t^2 (1-y^2) = 0$$

For $t\ne0$ we can divide through by $t^2$ and get

$$2 t y y' + 2 y^2 + (1 - y^2) = 0 \\ y' = \frac{-1}{2t} \frac{y^2+1}{y}$$

• Thanks. This explanation makes it easy to see how the substitution $x=ty$ makes the equation separable. – Devin Crossman Jun 18 '15 at 1:59

This is a fuller explanation of the pitfalls due to division by zero that you need to be aware of. The problem as stated is in fact incorrect because there is no such solution for all real $t$. If $t \in (0,\infty)$ then we can proceed by first proving that $x \ne 0$, since otherwise $t^2 = x^2 = 0$ and so $t = 0$. Only after that can we continue by the method of separating variables, which divides both sides by $xt$. Without proving that such divisions are valid, one can easily lose solutions. (An exception is if we only want complex meromorphic solutions, in which case we can divide by anything that has only isolated zeros, because a Laurent series is uniquely determined as long as only isolated points are unspecified, corresponding to where we divide by zero.)

Alternatively, you can observe the following (for $t>0$):

$(t^{-1}x^2)' = - t^{-2}x^2 + 2t^{-1}x\frac{dx}{dt} = t^{-2} ( tx\frac{dx}{dt} - x^2 ) = -1$

Thus $t^{-1}x^2 = -t + c$ for some constant $c$ and hence $x^2 = ct - t^2$.