How to Solve Differential Equations
Four Methods:The BasicsSolving First Order Differential EquationsSolving Second Order Differential EquationsSolving Higher Order Differential Equations
A full course in differential equations involves applications of derivatives to be studied after two or three semester courses in calculus. A derivative is the rate of change of one quantity with respect to another; for example, the rate at which an object’s velocity changes with respect to time (compare to slope). Such rates of change show up frequently in everyday life. For example, the compound interest law states that the velocity of interest accumulation is proportional to the principal account value, given by dV(t)/dt=rV(t) and V(0)=P, where P is the initial (principal) account value, V(t), a function of time, is the current account value (on which interest is continuously assessed), and r is the interest rate (dt is an instantaneous time interval, dV(t) is the infinitesimal amount by which V(t) changes in this time, and their quotient is the accumulation rate). Although credit card interest is typically compounded daily and described by the APR, annual percentage rate, this differential equation can be solved to give the continuous solution V(t) = Pe^(rt). This article will show you how to solve types of differential equations commonly encountered, especially in mechanics and physics.
Steps
Method 1 The Basics
- 1Define derivative. Derivative (also called differential quotient; especially British) - the limit of the ratio of the increment of a function (generally y) to the increment of a variable (generally x) in that function, as the latter tends to 0; the instantaneous change of one quantity with respect to another, as velocity, which is the instantaneous change of distance with respect to time. Compare first derivative, and second derivative:^{[1]}
- First derivative – the derivative of a function, example: "Velocity is the first derivative of distance with respect to time."
- Second derivative – the derivative of the derivative of a function, example: "Acceleration is the second derivative of distance with respect to time."
- 2Know the order and degree of the differential equation. The order of a differential equation is determined by the highest order derivative; the degree is determined by the power of highest derivative.
- 3Know the difference between a general, or complete solution versus a particular solution. A complete solution contains a number of arbitrary constants equal to the order the equation. (To solve an nth order differential equation, you have to perform n integrations, and each time you integrate, you have to introduce an arbitrary constant.) For example, in the compound interest law, the differential equation dy/dt=ky is of order 1, and its complete solution y = ce^(kt) has exactly 1 arbitrary constant. A particular solution is obtained by assigning particular values to the constants in the general solution.
This video serves an introduction to differential equations, and also demonstrates how to solve separable ordinary differential equations (please see next step) |
This is a longer, more detailed introductory video on differential equations.
Method 2 Solving First Order Differential Equations
A differential equation of the first-order and first-degree can be expressed as M dx + N dy = 0, where M and N are functions of x and y. To solve this differential equation, proceed as follows:
- 1Check to see if the variables are separable. Variables are separable if the differential equation can be expressed as f(x)dx + g(y)dy = 0, where f(x) is a function of x alone, and g(y) is a function of y alone. These are the easiest differential equations to solve. They can be integrated to give ∫f(x)dx + ∫g(y)dy = c, where c is an arbitrary constant. Here is a general approach. See Figure above for an example.
- Clear fractions. If the equation involves derivatives, multiply through by the differential of the independent variable.
- Collect all terms containing the same differential into a single term.
- Integrate each part separately.
- Simplify the expression, by combining terms, converting logarithms to exponents, and using the simplest symbol for arbitrary constants, for example.
This video demonstrates how to solve separable differential equations.
- 2If variables cannot be separated, check to see if the differential equation is homogeneous. A differential equation, M dx + N dy = 0, is homogeneous if replacement of x and y by λx and λy results in the original function multiplied by some power of λ, where the power of λ is called the degree of the original function. If so, follow these steps. See Figure above for an example.
- Let y=vx, so dy/dx = x(dv/dx) + v.
- From M dx + N dy = 0, we have dy/dx = -M/N = f(v), since y is a function v.
- So f(v) = dy/dx = x(dv/dx) + v. Now the variable x and v can be separated: dx/x = dv/(f(v)-v)).
- Solve the new differential equation with separable variable, then use the substitution y=vx to find y.
This video demonstrates how to solve homogeneous first order differential equations.
- 3If the differential equation cannot be solved by the previous two methods, see if you can express it as a linear equation, in the form of dy/dx + Py = Q, where P and Q are functions of x alone, or constants. Note that x and y can be used interchangeably here. If so, proceed as follows. See Figure above for an example.
- Let y=uv, where u and v are functions of x.
- Differentiating, to get dy/dx = u(dv/dx) + v(du/dx).
- Substituting into dy/dx + Py = Q, to get u(dv/dx) + v(du/dx) + Puv = Q, or u(dv/dx) + (du/dx + Pu)v = Q.
- Determine u by integrating du/dx + Pu = 0, where the variables are separable. Then use the value of u obtained to find v by solving u(dv/dx) = Q, where, again, the variables are separable.
- Finally, use the substitution y=uv to find y.
This video demonstrates how to solve first order linear differential equations.
- 4Solving the Bernoulli Equation^{[2]}: dy/dx + p(x) y = q(x) y^{n}, as follows:
- Let u = y^{1-n}, so du/dx = (1-n) y^{-n} (dy/dx).
- Thus, y = u^{1/(1-n)}, dy/dx = (du/dx) y^{n} / (1-n), and y^{n} = u^{n/(1-n)}.
- Substitute these into the Bernoulli Equation, and multiplying through by (1-n) / u^{n/(1-n)}, resulting in
du/dx + (1-n) p(x) u = (1-n) q(x). - Notice that this is now a first-order linear equation in the new variable u, and can be solved by the technique above (Step 3). Once solved, substitute back y = u^{1/(1-n)} for the complete solution.
This video demonstrates how to solve the Bernoulli differential equations.
Method 3 Solving Second Order Differential Equations
- 1Check to see if the differential equation satisfies the form shown in the first equation in Figure above, where f(y) is a function of y alone, or a constant. If so, simply follow the steps outlined in this Figure.
- 2Solving second order linear differential equations with constant coefficients: Check to see if the differential equation satisfies the form shown in the first equation in Figure above. If so, the differential equation can be solved simply as a quadratic equation as demonstrated by the subsequent steps.
This video demonstrates properties of the second order linear differential equations.
This video demonstrates how to solve the second order linear differential equations.
This funny video also demonstrates how to solve the second order linear differential equations. - 3To solve a more general second-order linear differential equation, check to see if the differential equation satisfies the form shown in the first equation in Figure above. If so, the differential equation can be solved with the following steps. See the subsequent steps in Figure above for an example.
- Solve first equation from Figure from the previous step (where f(x)=0) using the method outlined above. Let the complete solution be y = u. u is the complementary function for the first equation from the Figure above.
- Find a particular solution y = v of the first equation (1) from Figure above by trial. Follow these steps:
- If f(x) is not a particular solution of (1):
- If f(x) is in the form f(x) = a + bx, assume y = v = A + Bx;
- If f(x) is in the form f(x) = ae^{bx}, assume y = v = Ae^{bx};
- If f(x) is in the form f(x) = a_{1} cos bx + a_{2} sin bx, assume y = v = A_{1} cos bx + A_{2} sin bx.
- If f(x) is a particular solution of (1), assume for v the above form multiplied by x.
- If f(x) is not a particular solution of (1):
- The complete solution of (1) is given by y = u + v.
This video demonstrates how to solve a more general second order linear differential equations.
Method 4 Solving Higher Order Differential Equations
Higher order differential equations are much harder to solve, except certain special cases, as follows:
- 1Check to see if the differential equation satisfies the form shown in the first equation in Figure above, where f(x) is a function of x alone, or a constant. If so, simply follow the steps outlined in therein.
- 2Solving nth order linear differential equations with constant coefficients: Check to see if the differential equation satisfies the form shown in the first equation in Figure above. If so, the differential equation can be solved as shown in the subsequent steps.
- 3To solve a more general nth-order linear differential equation, check to see if the differential equation satisfies the form shown in the first equation in Figure above. If so, the differential equation can be solved in a method analogous to that used for solving second order linear differential equations, as shown in the subsequent steps.
Real Life Applications
- Compound interest law: the rate of interest accumulation is proportional to the starting amount of money. More generally, the rate of change with respect to an independent variable is proportional to the corresponding value of the function. That is, if y = f(t), dy/dt = ky. Solving this using the method of separable variable, we get y = ce^(kt), where y is a sum of money accumulating at compound interest, c is an arbitrary constant, k is the interest rate, for example, the interest in dollars on one dollar for a year, t is time. Time, therefore, is money.
- Note that the compound interest law applies to many areas of daily life. For example, suppose you are trying to dilute a salty solution by running water into the solution to decrease its salt concentration. How much water do you need to add, and how does the concentration of the solution change with respect to the rate you run the water?
Let s = quantity of salt in the solution at any time, x = the amount of water which has run through, and v = volume of the solution. The salt concentration of the mixture is given by s/v. Now suppose a volume Δx is leaked out of the solution, so the amount of salt leaked out is (s/v)Δx, hence the change in the amount of salt, Δs, is given by Δs = -(s/v)Δx. Divide both side by Δx, to get Δs/Δx = -(s/v). Take the limit as Δx-->0, and we have ds/dx = -s/v, which is a differential equation in the form of the compound interest law, where y is now s, t is now x, and k is now -1/v. - Newton's law of cooling is yet another variation of the compound interest law. It states that the time-rate of decrease in body temperature in excess of the temperature of the surrounding air is proportional to the body temperature above that of the surrounding air. Let x = body temperature above that of the surrounding air, t = time, we have dx/dt = kx, where k is a constant. The solution to this differential equation is x = ce^(kt), where c is an arbitrary constant, as above. Suppose this excess temperature, x, was at first 80 degrees, and drops to 70 degrees after a minute. What will it be after 2 minutes?
Let t = time in minutes, x = excess temperature in degrees, we have 80 = ce^(k*0) = c. Also, 70 = ce^(k*1) = 80e^k, so k = ln(7/8). So x = 70e^(ln(7/8)t) is a particular solution to this problem. Now plug in t = 2, we have x = 70e^(ln(7/8)*2) = 53.59 degrees after 2 minutes. - In atmospheric thermodynamics, atmospheric pressure p above sea level changes in proportion to the altitude h above sea level--yet another variation of the compound interest law. The differential equation here is dp/dh = kh, where k is constant.
- In chemistry, the velocity of a chemical reaction in which x is the amount transformed in time t is the time-rate of change of x. Let a = concentration at the beginning of the reaction, then dx/dt = k(a-x), where k is the velocity constant. This is another variation of the compound interest law where (a-x) is now the dependent variable. See that d(a-x)/dt = -k(a-x), so d(a-x)/(a-x) = -kdt. Integrate, to get ln(a-x) = -kt + a, since a-x = a at time t = 0. Rearranging, we see that the velocity constant k = (1/t)ln(a/(a-x)).
- In electromagnetism, given an electric circuit with voltage V and current i (amperes), the voltage V is consumed in overcoming the resistance R (ohms) of the circuit and the inductance L, as governed by the equation V=iR + L(di/dt), or di/dt = (V - iR)/L. This is another variation of the compound interest law, where V - iR is now the dependent variable.
- Note that the compound interest law applies to many areas of daily life. For example, suppose you are trying to dilute a salty solution by running water into the solution to decrease its salt concentration. How much water do you need to add, and how does the concentration of the solution change with respect to the rate you run the water?
- In acoustics, simple harmonic vibration has acceleration being directly proportional to the negative of distance. Recall that acceleration is the second derivative of distance, so d^{2}s/dt^{2} + k^{2}s = 0, where s = distance, t = time, and k^{2} is the magnitude of acceleration at unit distance. This is the simple harmonic equation, a second order linear differential equation with constant coefficients, as solved in Figure 6, equations (9) and (10). The solution is s = c_{1}cos kt + c_{2}sin kt.
This can be further simplified by setting c_{1} = b sin A, c_{2} = b cos A. Substitute these in, to get b sin A cos kt + b cos A sin kt. Recall from trigonometry, that sin (x+y) = sin x cos y + cos x sin y, so the expression reduces to s = b sin (kt + A). The waveform obeying the simple harmonic equation oscillates between b and -b, with period 2π/k.- Vibrating spring: take an object, with mass m, on a vibrating spring. By Hooke's Law,^{[3]} when the spring is stretched or compressed s units from its natural length (or equilibrium position), it exerts a restoring force F proportional to s, or F = -k^{2}s. By Newton's Second Law (force equals mass times acceleration),^{[4]} we have m d^{2}s/dt^{2} = -k^{2}s, or m d^{2}s/dt^{2} + k^{2}s = 0, which is an expression of the simple harmonic equation.
- Damped vibrations: consider the vibrating spring as above, with a damping force. A damping force is any effect, such as friction, that tends to reduce the amplitude of oscillations in an oscillator. For example, a damping force could be supplied by a shock absorber in an automobile. In most cases, the damping force, F_{d}, is approximately proportional to the velocity of the object,^{[5]} or F_{d} = -c^{2} ds/dt, where c^{2} is a constant. Combining the damping force with the restoring force, we have -k^{2}s - c^{2} ds/dt = m d^{2}s/dt^{2}, by Newton's second law. Or, m d^{2}s/dt^{2} + c^{2} ds/dt + k^{2}s = 0. This differential equation is a second-order linear equation that can be solved by solving the auxiliary equation mr^{2} + c^{2}r + k^{2} = 0, after substituting s = e^(rt).
Solving this by the quadratic formula, we get r_{1} = (-c^{2}+ sqrt(c^{4}- 4mk^{2})) / 2m; r_{2}= (-c^{2} - sqrt(c^{4} - 4mk^{2})) / 2m.- Overdamping: If c^{4} - 4mk^{2} > 0, r_{1} and r_{2} are real and distinct. The solution is s = c_{1}e^(r_{1}t) + c_{2}e^(r_{2}t). Since c^{2}, m, and k^{2} are all positive, sqrt(c^{4} - 4mk^{2}) must be less than c^{2}, which implies that both roots, r_{1} and r_{2}, are negative, and the function is in exponential decay. In this case, oscillation does not occur. A strong damping force, for instance, could be supplied by high-viscosity oil or grease.
- Critical damping: If c^{4} - 4mk^{2} = 0, r_{1} = r_{2} = -c^{2} / 2m. The solution is s = (c_{1} + c_{2}t)e^((-c^{2}/2m)t). This is still exponential decay, with no oscillation. However, the slightest decrease in damping force will cause the object to oscillate past the equilibrium point.
- Underdamping: If c^{4} - 4mk^{2} < 0, the roots are complex, given by -c/2m +/- ωi, where ω = sqrt(4mk^{2} - c^{4})) / 2m. The solution is s = e^(-(c^{2}/2m)t) (c_{1} cos ωt + c_{2} sin ωt). This is an oscillation damped by the factor e^(-(c^{2}/2m)t. Since both c^{2} and m are positive, e^(-(c^{2}/2m)t) will go to zero as t approaches infinity. So eventually the motion will decay to zero.
Tips
- Many differential equations simply cannot be solved by the above methods. The methods above, however, suffice to solve many important differential equations commonly encountered.
- Substitute your solution back into the original differential equation, to see whether the equation is satisfied. This will verify that you have solved the differential equation correctly.
- Note: the converse of differential calculus is called integral calculus, which deals with summation of the effects of continuously changing quantities; for example, computing the distance (compare to d = rt) covered by an object when its instantaneous rates (velocities) over a time interval are known.
Warnings
- Unlike differentiation, in which the derivative of any given expression can be calculated, the integral of many expressions simply cannot be calculated. So do not waste your time trying to integrate an expression that cannot be integrated. Just make sure to check a Table of Integrals to verify. The solution of a differential equation is considered effected when it has been reduced to an expression involving integrals, whether the actual integration can be effected or not.
Things You'll Need
- Paper
- Pen or pencil
- A Table of Integrals may help
Sources and Citations
- ↑ Dictionary.com Unabridged based on Random House Dictionary © Random House, Inc. 2009.
- ↑ Bernoulli, Jacob (1695), "Explicationes, Annotationes & Additiones ad ea, quae in Actis sup. anni de Curva Elastica, Isochrona Paracentrica, & Velaria, hinc inde memorata, & paratim controversa legundur; ubi de Linea mediarum directionum, alliisque novis", Acta Eruditorum . Cited in Hairer, Nørsett & Wanner (1993).
- ↑ http://en.wikipedia.org/wiki/Hooke's_law
- ↑ http://en.wikipedia.org/wiki/Newton%27s_second_law#Newton.27s_second_law
- ↑ http://en.wikipedia.org/wiki/Damping
Article Info
Featured Article
Categories: Featured Articles | Calculus