# Is this a legitimate method for solving first order ODEs in fractional form?

1. Dec 20, 2011

### tjackson3

Suppose we have some ODE given by $y' = G(x,y)/H(x,y)$. Let x and y depend on a third variable, t, so that x and y are parametrized in a way. Then applying the chain rule to y' gives

$$\frac{dy}{dx} = \frac{\frac{dy}{dt}}{\frac{dx}{dt}} = \frac{G(x,y)}{H(x,y)}$$

Then comparing the numerators and denominators gives a system of equations for x and y: $dy/dt = G(x,y); dx/dt = H(x,y).$ Then you can solve this system of equations for x and y to get a very, very implicit solution to the problem.

An example for this method is the following differential equation:

$$y' = \frac{x+3y-5}{x-y-1}$$

If the constants weren't there, this equation would be homogeneous. However, with them, the method I described above can be implemented. One would then need to solve the system

$$\vec{y}' = \left( \begin{array}{cc} 1 & 3 \\ 1 & -1 \end{array} \right)]\vec{y} - \left( \begin{array}{c}5 \\ 1 \end{array} \right)$$

where $\vec{y} = (y, x)^T$. Solving this system gives $y(t) = 3c_1e^{2t} + c_2e^{-2t} - 5$ and $x(t) = c_1e^{2t} - c_2e^{-2t} - 1.$

This doesn't give y as a function of x unfortunately, but it does give a solution, however implicit. Is this legitimate, or is there a better method?

edit: Incidentally, you can actually get this particular solution in terms of x. Note that $x(t) = 2\sinh(2t) - 1 \Rightarrow \frac{x+1}{2} = \sinh(2t) \Rightarrow t = \frac{1}{2}\sinh^{-1}\left(\frac{x+1}{2}\right)$. You can plug this into the y equation to get a horrific expression for y in terms of x, but this won't be the case in general.

Last edited: Dec 20, 2011
2. Dec 20, 2011

### jackmell

That's a perfectally fine and common way to do that although I didn't check your work for accuracy. Also, there is a section in the DE text "Coefficients linear in the two variables" that I think would also apply.

3. Dec 21, 2011

### JJacquelin

Infortunately, I don't think so, except in case of linear G(x,y) and H(x,y)
In the general case, this will probably lead to PDE, more comlplicated to solve than the ODE.
Did you try some examples of non-linear G(x,y) or H(x,y) ?

In case of linear G(x,y) and H(x,y), you write:
The constants are very easily eliminated thanks to a change of variables. In fact, the relationship between (x,y) and the new vatiables is the same matrix than your matrix. So, both methods are equivalent.

4. Dec 21, 2011

### jackmell

Alright, I realize you know more about DEs than me Jacquelin but I'd have to disagree with that. Suppose I have for example:

$$\frac{dy}{dx}=\frac{2x^2y^2-4y^3}{y-y^2x^2}$$

then I see nothing wrong with instead solving the system:

$$\frac{dy}{dt}=2x^2y^2-4y^3$$
$$\frac{dx}{dt}=y-y^2x^2$$

although it's just as hard probably to do so analytically.

5. Dec 21, 2011

### JJacquelin

I never pretend to know more about DE's than anybody.
Simply, I observe that there are many manner to transform an ODE. But is there one of them leading to the solution ? That is the question.
As long as the solution is not really obtained...
Of course, there is nothing wrong with the method proposed. But, except in some particular cases, does it actually leads to the solution ?
In your exemple of non linear H(x,y and G(x,y), does it actually leads to the solution ?

6. Dec 21, 2011

### jackmell

You're right. I should have checked it first. Told you. So I ran an IVP of the DE first in terms of dy/dx then ran the same IVP in terms of the system {dy/dt, dx/dt} and then superimposed the two results. At least visually, they are the same solution.

Code (Text):

mysol1 = NDSolve[{Derivative[1][y][x] ==
(2*x^2*y[x]^2 - 4*y[x]^2)/(y[x] - y[x]^2*x^2),
y[0] == 1}, y, {x, 0, 0.8}]
p1 = Plot[y[x] /. mysol1, {x, 0, 8},
PlotRange -> {{0, 1}, {0, 1}}, PlotStyle -> Red]
mysol = NDSolve[{Derivative[1][y][t] ==
2*x[t]^2*y[t]^2 - 4*y[t]^2,
Derivative[1][x][t] == y[t] - y[t]^2*x[t]^2,
y[0] == 1, x[0] == 0}, {x, y}, {t, 0, 10}]
p2 = ParametricPlot[{x[t], y[t]} /. mysol,
{t, 0, 10}, PlotStyle -> Blue,
PlotRange -> {{0, 1}, {0, 1}}]
Show[{p1, p2}]

Probably though I figure that's not what you're talking about but you did say "solution" so numerical solution in my opinion would indeed qualify.

#### Attached Files:

• ###### decheck.jpg
File size:
5.7 KB
Views:
66
7. Dec 22, 2011

### JJacquelin

In my preceeding post, "solution" means "analytical solution". but not numerical solution.
Now, if we look for numerical solution, it is clear that the result is the same for the first ODE and for any other ODE or ODE system which are odtained by a transformation of the first (as far as the transformation is bi-uniform and correctly made).
So it is not a surprise that you obtain consistant numerical results for the ODE and for the ODE system comming from it.
Nevertheless, it was interesting to practically compare the numerical methods.

8. Dec 22, 2011

### bigfooted

You add an independent variable to y(x), which now becomes y(x,t). the independent variable x does not vanish from y. Additionally, you also make x dependent on t: x(t)
You then end up with an ode of the form y'(x,t)=x(t) +y(x,t).

The coupled system is actually harder to solve. Usually, you work in the opposite direction. and reduce the system to a single ode. In this case, when you work back, you can eliminate t as an independent variable.

BTW, your first example problem has as solution an expression containing the Lambert W function.

In general, for (non)linear ode's you would try to find the classification of the ode (separable, homogeneous, riccati, etc.) or when this fails, use a more advanced strategy like Lie's method of symmetry analysis.