# Non-linear ODE.

## Main Question or Discussion Point

I'm curious about the differential equation which takes the general form of,
$$y'+Cy^2=D$$.
Where C and D are constants. According to mathematica, the answer is:
$$\sqrt{\frac{D}{C}} \tanh{(x \sqrt{CD})}$$.
But I'd like to know how this is done by hand, I was able to do this with separation of variables and finding x, then solving for y, but it was a large waste of time and I'm curious if there is a general way to solve this just as linear ones can be solved.

Related Differential Equations News on Phys.org
lurflurf
Homework Helper
no that is why linear equations are nice they are much easier to solve and can always (at least in principle) be solved. It is a simple integration.

HallsofIvy
Homework Helper
I don't know why you would use the Riccatti equation. This is a simple, separable, first order differential equation. It can be integrated directly. I don't know exactly what gamesguru did or why he considers it a "large waste of time" but it is not difficult. It separates into
$$\frac{dy}{Cy^2+ D}= dx[/itex] multiplying on both sides by D, we get [tex]\frac{dy}{\frac{C}{D}y^2+ 1}= Ddx$$
Now, what we do depends upon the signs of C and D. If C and D have opposite signs so that C/D is negative, write the equation as
$$\frac{dy}{1- \left|\frac{C}{D}}\right|y^2}= Ddx$$
and let $u= \sqrt{|C/D|}$. Then the equation becomes
$$\sqrt{|C/D|}\frac{du}{u^2+ 1}= Ddt$$
and the solution is exactly what gamesguru said.

If C and D have the same sign, let u= $\sqrt{C/D}y$ so that the equation becomes
$$\sqrt{\frac{D}{C}}\frac{du}{u^2+ 1}= Ddt$$
and integrating gives the same thing with "tan" rather than "tanh".

exk
Shouldn't it be:
$$\frac{dy}{D-Cy^2}= dx$$
?
The answer changes, but the method is the same.

I don't know why you would use the Riccatti equation.
Yes, but he wanted to know if there was a way to do it without separation of variables.