Closed-Form Solutions of Non-Linear Differential Equations

This is an example that shows how to solve a non-linear first order ordinary differential equation manually when an integrating factor can be found just by integration. At the end, we show you how to solve it directly. Let's solve the differential equation

      y' = y/(x + y log y)

Using the notation

      m(x,y)+n(x,y)y' = 0

we have m=-y and n=x+y*log y

We first check for exactness, that is, does dm/dy=dn/dx?

This is not zero, so the equation is not exact. Therefore we must look for an integrating factor, that is, a function mu(x,y) such that d(mu m)/dy=d(mu n)/dx. Normally, we first search for mu(x,y) depending only on x or only on y. Let's search for such a mu(x) first.

If the above is zero for a function mu that does not depend on y, then mu(x) is an integrating factor.

The solution depends on y, so there is no integrating factor that depends on x only. Let's look for on that depends on y only.

We've found one. The above mu(y) is an integrating factor. We must multiply our initial equation (that is, m and n) by the integrating factor.

Let's check for exactness.

We must solve the exact equation, that is, find a function s(x,y) such that ds/dx=m and ds/dy=n. We start by writing

      s(x,y) = h(y) + integrate(m,x)

where h(y) is an unknown function of y. This guarantees that ds/dx=m.

All we want is to find h(y) such that ds/dy=n.

The above particular solution is the h(y) we want, so we just replace h(y) by it in the implicit solution.

A first integral of the initial equation is obtained by setting this result equal to an arbitrary constant. Now that we've seen how to solve the equation "by hand" we show you how to do it with the solve operation. First define y to be an operator.

Next we create the differential equation.

Finally, we solve it.