Thursday, 28 April 2011

Simple differential equation I

Simple differential equations
An ordinary differential equation (or ODE) is a relation that contains functions of only one independent variable, and one or more of their derivatives with respect to that variable.
In some differential application problem we may not notice that we have used the techniques of differential equation, but actually we are solving it.

Example 1. The depth of water in a uniform bucket is 10 cm. If the rate of outflow is 5t/4 cm/min, find the time required for all water to flow out.
Set up dh/dt = -5t/4, h = ∫ (-5t/4) dt = -5h2/8 + C, C = 10.
By h = 10 – 5t2/4, we get t = 4 (min).

This is the very beginning form of differential equations: dy/dx = f(x).
The solution is simply = y = ∫f(x) dx = F(x) + C.

Now consider a harder general form: dy/dx = f(x)g(y)
By arranging terms we get dy/g(y) = f(x) dx
Integrate both sides: (Note that this action isn’t done respective to a certain variable. We simply put a integration sign on both sides like apply them in function. This is based on the uniqueness of ODE, but is not to be proofed here.)
∫ dy/g(y) = ∫ f(x) dx = F(x) + c.

Example 2. Solve the ODE  dA/dt = -10A
We have dt = -dA/10A, integrating both sides give t = -ln|A|/10 + c
But we have to solve A (not t), so ln|A| = -10(t-c), A=e-10(t-c)=Ce-10t .

Example 3. Solve (x2+1)cos y (dy/dx) + x sin y = 0 where y(2) = π/2
Rearrangement gives dy/dx = -x tan y / (x2+1)
dy / tan y = -x dx / (x2 +1)
Integrate gives ln(sin y) = -ln(x2+1)/2 +c
Simplification gives ln(x2+1)/2 + ln(sin y) = ln c’
(x2+1)sin2 y = c2
Put (x,y) = (2, π/2), (22+1)sin2π/2 = 5
Therefore (x2+1)sin2 y = 5

Example 4. Solve ln(dy/dx) = x+2y where y(0) = 0.
We have dy/dx = exe2y, e-2ydy = exdx, ex + e-2y/2 + c = 0
Put (x,y) = (0,0), c = -3/2 =>  e-2y = 3 - 2ex => y = -ln(3-2ex)/2.
For the general form dy/dx +Py = Q, we can’t simply integrate both sides. Instead, we multiply the integrating factor to both sides: IF = e∫P(x) dx.
(dy/dx + Py)(e∫P(x) dx) = Q(e∫P(x) dx)
d(ye∫P(x) dx)/dx = Q(e∫P(x) dx)
Then the variables are now separated.

Example 5. Consider the air friction model: dv/dt + vr = g, where r is a constant depending on the component of air.
Identifying IF = (e∫P(t) dt) = ert
ert(dv/dt + vr) = ertg
d(vert)/dt = gert
Integrate gives vert = gert/r + c, put (v,t) = (0,0) and arrange gives
v = (g – ge-rt)/r
This suits the physical observation.

Now let’s talk about some history:
Till today there’re still argument about who has been inventing calculus first, between Newton and Leibniz. Newton emphasizes Fluxional calculus which applies on area calculation by a earlier realization of Riemann Sum. Leibniz, in contrast, use the concept of infinitesimal calculus to calculate tangents.
In fact, the modern presentation of calculus, including the ∫ sign and dx dy, are created by Leibniz. Leibniz state dx as a infinitely small quantity and done his fundamental theory of calculus. In the other side, Newton avoid to use the small quantity variable, he uses x + o where o is a small quantity (but he thinks that adding up such small quantity would made mistake, which not any mistake should be neglected in a strict manner of pure mathematics.) His notation (differential as adding a dot above the variable) in only applied in physics field only. Leibniz’s notation was popular due to the convenience properties of dx, dy. If you state them as a quantity, you can easily understand why they can be cross-multiplied. Though we will not give a strict proof here.
1)       Solve dy/dx = 2y
2)       Solve dx/dy = 2xy.
3)       Solve dy/dx = 3x2 – 1.
4)       Solve sin x (dy/dx) + 2y cos x = cos x.
5)       Solve (dy/dx)2 = (x+1)/(x+2)2.
6)       Solve dy/dx = x(x2 – y) .
7)       Solve 1 + (x tan y – sec y)(dy/dx) = 0.


  1. why in Example 5 ert(dv/dt + vr) = ertg will make d(vert)/dt = gert
    I dont get the simplfication..

    1. Because v's not a constant. Instead it's a function w.r.t. time t (i.e. v(t))
      By product rule, (v(t) e^(rt))' = v'(t) e^(rt) + v(t) re^(rt).

      The idea of integrating factor is basically making up a multiplying factor so that such a 'reversed version of product rule' can happens.

      Thanks for your question :3