# Nonlinear nightmare

1. Sep 18, 2014

### e2m2a

Is it possible to solve a nonlinear differential equation of the form below such that the dependent variable y can be expressed as a function of time t?

(second time derivative of y) = y + y squared + y cube

2. Sep 18, 2014

### da_nang

$$y'' = y + y^2 + y^3$$

That equation? It's separable and the polynomial isn't of too high a degree. The double integral will make it nasty though so don't expect an explicit function.

3. Sep 18, 2014

### e2m2a

Here is how this problem arose. I derived a differential equation using Lagrangian for the following situation:

Imagine a near massless rod of length L with a mass m at the end of the rod. Imagine it is pivoted at one end and has one degree of freedom so that it can rotate in a counter-clockwise direction in a plane perpendicular to the surface of the earth.

At some point in time and at the zero degree position the rod begins to rotate with an initial angular velocity dot theta. Using the Lagrangian, I derived this:

double dot theta = -g/L cos(theta), where g is the gravitational constant.

Now this differential equation does not satisfy what I wanted. I was looking for a way to express dot theta as a function of time. I believe this result would be considered a nonlinear equation. I am not sure if this equation is considered a homogeneous or nonhomogeneous differential equation. Is it true that nonlinear equations are often impossible to solve?

Any way, what we get is the above differential equation that shows the angular acceleration of the mass as a function of theta. By substituting the cos(theta) for a Taylor polynomial series, I was hoping I could get dot theta as a function of time by doing some operations on the Taylor polynomials.

Would this be possible, or would using Hamiltonian analysis give me the desired result, finding an expression of dot theta as a function of time?

4. Sep 18, 2014

### Staff: Mentor

You can multiply the equation by y' and integrate wr to time to obtain:

$$\frac{1}{2}(y')^2=\frac{y^2}{2}+\frac{y^3}{3}+\frac{y^4}{4}+C$$

Then take the square root of both sides to obtain:

$$y'=\pm\sqrt{C+y^2+\frac{2y^3}{3}+\frac{y^4}{2}}$$

Chet

5. Sep 18, 2014

### e2m2a

Sorry, I don't see how you did this and where is the independent variable t in this?

6. Sep 18, 2014

### e2m2a

The term on the left should be a second order derivative of y with respect to time.
I don't know exactly what you mean by a double integral. Do you mean integrate both sides twice-- the left side with respect to y and the right side with respect to t two times?

7. Sep 18, 2014

### Staff: Mentor

$$\frac{d^2y}{dt^2}=y+y^2+y^3$$
Multiply both sides of the equation by $\frac{dy}{dt}$:
$$\frac{dy}{dt}\frac{d^2y}{dt^2}=y\frac{dy}{dt}+y^2\frac{dy}{dt}+y^3\frac{dy}{dt}$$
But,
$$\frac{dy}{dt}\frac{d^2y}{dt^2}=\frac{1}{2}\frac{d}{dt}\left(\left(\frac{dy}{dt}\right)^2\right)$$
So, integrating with respect to t, we obtain:

$$\frac{1}{2}\left(\frac{dy}{dt}\right)^2=\frac{y^2}{2}+\frac{y^3}{3} +\frac{y^4}{4}+C$$

Then take the square root of both sides to obtain:

$$\frac{dy}{dt}=\pm\sqrt{C+y^2+\frac{2y^3}{3}+\frac{y^4}{2}}$$

Chet

8. Sep 18, 2014

### e2m2a

Thank you for the explanation.