Welcome to our community

Be a part of something great, join today!

Cannot isolate y (first order quadratic DE?)

GreenGoblin

Member
Feb 22, 2012
68
I am required to solve two versions of the similar equation for y(x). I think this would be called a quadratic first order differential equation, but I don't even know if that is the correct name:

1)[TEX]\frac{dy}{dx}=y - \frac{y^{2}}{10} - 0.9[/TEX]
2)[TEX]\frac{dy}{dx}=y - \frac{y^{2}}{10} - 5[/TEX]

Confidence exists that if I can do one I can do the other since its just changing one value. Let's try the first.

What I tried:

Dividing through the RHS and multiplying by dx, integrating, I get obviously log of the function times 1/ the derivative of the log = x. BUT, then I don't know how to get the y on its own. Basically, I am used to linear problems only. I don't know how to isolate y here because if I take exponents it gets stuck in there and the whole thing gets messy. I would think this is a pretty common problem that once learned is learned. But I haven't learned it and don't know where to. Can anyone help?
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
If given an ODE of the form:

$\displaystyle \frac{dy}{dx}=ay^2+by+c$

I would rewrite it as (separating variables):

$\displaystyle \frac{dy}{ay^2+by+c}=dx$

Next, I would complete the square on the denominator on the left, to get either a sum of squares (resulting in an inverse tangent anti-derivative) or a difference of squares (resulting in a logarithmic anti-derivative through partial fractions).

Many times you will get an implicit solution, although in this case you may choose to express $x$ as a function of $y$.

Another option would be to compute an integrating factor, resulting in an exact ODE.
 

GreenGoblin

Member
Feb 22, 2012
68
If given an ODE of the form:

$\displaystyle \frac{dy}{dx}=ay^2+by+c$

I would rewrite it as (separating variables):

$\displaystyle \frac{dy}{ay^2+by+c}=dx$

Next, I would complete the square on the denominator on the left, to get either a sum of squares (resulting in an inverse tangent anti-derivative) or a difference of squares (resulting in a logarithmic anti-derivative through partial fractions).

Many times you will get an implicit solution, although in this case you may choose to express $x$ as a function of $y$.

Another option would be to compute an integrating factor, resulting in an exact ODE.
Thanks for your reply, using the method you said I lead to: [TEX]\frac{-1}{10}\frac{dy}{(y-5)^{2}-16}= dx[/TEX]. IS this useful? How can I make it into partial fractions as you say?
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Thanks for your reply, using the method you said I lead to: [TEX]\frac{-1}{10}\frac{dy}{(y-5)^{2}-16}= dx[/TEX]. IS this useful? How can I make it into partial fractions as you say?
Yes, this is correct for the first equation you gave. To simplify a bit, I would use the substitution:

$u=y-5\,\therefore\,du=dy$

and multiply through by 10 to get:

$\displaystyle \frac{du}{4^2-u^2}=10\,dx$

Use the difference of squares formula:

$\displaystyle \frac{du}{(4+u)(4-u)}=10\,dx$

Now, for the integrand on the left, assume the partial fraction decomposition has the form:

$\displaystyle \frac{1}{(4+u)(4-u)}=\frac{A}{4+u}+\frac{B}{4-u}$

Using the Heaviside cover-up method, we find:

$\displaystyle A=B=\frac{1}{8}$ hence:

$\displaystyle \frac{1}{(4+u)(4-u)}=\frac{1}{8}\left(\frac{1}{4+u}+\frac{1}{4-u} \right)=\frac{1}{8}\left(\frac{1}{u+4}-\frac{1}{u-4} \right)$

and now we have:

$\displaystyle \left(\frac{1}{u+4}-\frac{1}{u-4} \right)\,du=80\,dx$

Now integrate, then back-substitute for $u$. In this case you can actually solve for $y$ in the end. Let us know how you progress.:cool:
 

GreenGoblin

Member
Feb 22, 2012
68
Yes, this is correct for the first equation you gave. To simplify a bit, I would use the substitution:

$u=y-5\,\therefore\,du=dy$

and multiply through by 10 to get:

$\displaystyle \frac{du}{4^2-u^2}=10\,dx$

Use the difference of squares formula:

$\displaystyle \frac{du}{(4+u)(4-u)}=10\,dx$

Now, for the integrand on the left, assume the partial fraction decomposition has the form:

$\displaystyle \frac{1}{(4+u)(4-u)}=\frac{A}{4+u}+\frac{B}{4-u}$

Using the Heaviside cover-up method, we find:

$\displaystyle A=B=\frac{1}{8}$ hence:

$\displaystyle \frac{1}{(4+u)(4-u)}=\frac{1}{8}\left(\frac{1}{4+u}+\frac{1}{4-u} \right)=\frac{1}{8}\left(\frac{1}{u+4}-\frac{1}{u-4} \right)$

and now we have:

$\displaystyle \left(\frac{1}{u+4}-\frac{1}{u-4} \right)\,du=80\,dx$

Now integrate, then back-substitute for $u$. In this case you can actually solve for $y$ in the end. Let us know how you progress.:cool:
What you just did is absolutely world class, I am going to work through and get an understanding, see if I get stuck again. Just want to say thanks a lot for now that gives me a lot to go with!
 

GreenGoblin

Member
Feb 22, 2012
68
What you just did is absolutely world class, I am going to work through and get an understanding, see if I get stuck again. Just want to say thanks a lot for now that gives me a lot to go with!
One point: have I not made a mistake with the coefficient -1/10 on the LHS, should it not be -10? Since it is in the denominator.
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
Assume that we want to solve the differential equation of the form :

$$y'=ay^2+by+c$$

Let us try to solve the right hand side by the quadratic formula :


[tex]y=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/tex]

[tex]y'=(y-\frac{-b+\sqrt{b^2-4ac}}{2a})(y-\frac{-b-\sqrt{b^2-4ac}}{2a})[/tex]

so assume that the roots are

[tex]k_1=\frac{-b+\sqrt{b^2-4ac}}{2a}\,\,\, k_2=\frac{-b-\sqrt{b^2-4ac}}{2a}[/tex]


[tex]y'=(y-k_1)(y-k_2)[/tex]


[tex]\frac{dy}{(y-k_1)(y-k_2)}=dx[/tex]


[tex]\left(\frac{1}{y-k_1}-\frac{1}{y-k_2}\right)dy=dx(k_1-k_2)[/tex]

Now integrate both sides to get :

[tex]\ln\left|\frac{y-k_1}{y-k_2}\right|=(k_1-k_2)x+C[/tex]
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
One point: have I not made a mistake with the coefficient -1/10 on the LHS, should it not be -10? Since it is in the denominator.
Yes, you are right, sorry for missing that.(Tmi)
 

MarkFL

Administrator
Staff member
Feb 24, 2012
13,775
Assume that we want to solve the differential equation of the form :

$$y'=ay^2+by+c$$

Let us try to solve the right hand side by the quadratic formula :


[tex]y=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/tex]

[tex]y'=(y-\frac{-b+\sqrt{b^2-4ac}}{2a})(y-\frac{-b-\sqrt{b^2-4ac}}{2a})[/tex]

so assume that the roots are

[tex]k_1=\frac{-b+\sqrt{b^2-4ac}}{2a}\,\,\, k_2=\frac{-b-\sqrt{b^2-4ac}}{2a}[/tex]


[tex]y'=(y-k_1)(y-k_2)[/tex]


[tex]\frac{dy}{(y-k_1)(y-k_2)}=dx[/tex]


[tex]\left(\frac{1}{y-k_1}-\frac{1}{y-k_2}\right)dy=dx(k_1-k_2)[/tex]

Now integrate both sides to get :

[tex]\ln\left|\frac{y-k_1}{y-k_2}\right|=(k_1-k_2)x+C[/tex]
What happens when the roots are complex?
 

Fernando Revilla

Well-known member
MHB Math Helper
Jan 29, 2012
661
I am required to solve two versions of the similar equation for y(x). I think this would be called a quadratic first order differential equation, but I don't even know if that is the correct name:

1)[TEX]\frac{dy}{dx}=y - \frac{y^{2}}{10} - 0.9[/TEX]
2)[TEX]\frac{dy}{dx}=y - \frac{y^{2}}{10} - 5[/TEX]
Out of curiosity: $y'=ay^2+by+c$ is a separated variables equation and also a Riccati equation. If $k\in\mathbb{R}$ is a solution of the equation $at^2+bt+c=0$ then, $y_1=k$ is a particular solution, and with the substitution $y=y_1+\dfrac{1}{v}$ we get a linear equation on $v$.

At any case (as has been said) is better to solve it by separation of variables.
 

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
When the roots of the polynomial are complex, this will require some knowledge of the principle logarithm in complex analysis

[tex]\text{Log}z = \ln|z|+i\text{Arg}(z)[/tex]

Let us assume that we want to find the solution of the differential equation :

[tex]y'=y^2+1[/tex]

Clearly this is separable and can be solved directly ...

[tex]y=\tan(x+C) [/tex]

Now let us prove our method :

[tex]\text{Log}\left( \frac{y-k_1}{y-k_2}\right)=(k_1-k_2)x+C[/tex]

we have that $k_1=i $ and $k_2=-i$

[tex]\text{Log}\left(\frac{y-i}{y+i}\right)=2ix+C_1[/tex]

Now we multiply by the conjugate :

[tex]\text{Log}\left(\frac{(y-i)^2}{y^2+1}\right)=2ix+C_1[/tex]

[tex]2\text{Log}(y-i)-\ln{(y^2+1)}=2ix+C_1[/tex]

[tex]\text{Log}{(y-i)}=\ln \sqrt{(y^2+1)}+i\arctan\left(\frac{-1}{y}\right)=\frac{1}{2}\ln(y^2+1)+i\arctan(y)+C_2[/tex]

[tex]2\left(\frac{1}{2} \ln (y^2+1)+i\arctan(y)+C_2\right)-\ln{(y^2+1)}=2ix+C_1[/tex]

[tex]\ln(y^2+1)+2i\arctan(y)-\ln{(y^2+1)}=2ix+C_3[/tex]

[tex]\arctan(y)=x+C[/tex]

[tex]y=\tan(x+C) [/tex]