Examples of differential equations: Difference between revisions

Content deleted Content added
move to footer
m upright 'd' in 'dx/dt' and similar
Line 3:
== Separable first-order ordinary differential equations ==
{{see also|Separable partial differential equation}}
Equations in the form <math>\frac {dy\mathrm d }{\mathrm dx} = f(x)g(y)</math> are called separable and solved by <math>\frac {\mathrm dy}{g(y)} = f(x)\mathrm dx</math> and thus
<math>\int\frac {\mathrm dy}{g(y)} = \int f(x)\mathrm dx</math>. Prior to dividing by <math>g(y)</math>, one needs to check if there are stationary (also called equilibrium)
solutions <math>y=const</math> satisfying <math>g(y)=0</math>.
 
Line 12:
must be homogeneous and has the general form
 
:<math>\frac{\mathrm dy}{\mathrm dt} + f(t) y = 0</math>
 
where <math>f(t)</math> is some known [[function (mathematics)|function]]. We may solve this by [[separation of variables]] (moving the ''y'' terms to one side and the ''t'' terms to the other side),
 
:<math>\frac{\mathrm dy}{y} = -f(t)\, \mathrm dt</math>
 
Since the separation of variables in this case involves dividing by ''y'', we must check if the constant function ''y=0'' is a solution of the original equation. Trivially, if ''y=0'' then ''y'=0'', so ''y=0'' is actually a solution of the original equation. We note that ''y=0'' is not allowed in the transformed equation.
Line 22:
We solve the transformed equation with the variables already separated by [[Integral Calculus|Integrating]],
 
:<math>\ln |y| = \left(-\int f(t)\,\mathrm dt\right) + C\,</math>
 
where ''C'' is an arbitrary constant. Then, by [[exponentiation]], we obtain
 
:<math>y = \pm e^{\left(-\int f(t)\,\mathrm dt\right) + C} = \pm e^{C} e^{-\int f(t)\,\mathrm dt}</math>.
 
Here, <math>e^{C}>0</math>, so <math>\pm e^{C}\neq 0</math>. But we have independently checked that ''y=0'' is also a solution of the original equation, thus
:<math>y = A e^{-\int f(t)\,\mathrm dt}</math>.
with an arbitrary constant ''A'', which covers all the cases. It is easy to confirm that this is a solution by plugging it into the original differential equation:
 
:<math>\frac{\mathrm dy}{\mathrm dt} + f(t) y = -f(t) \cdot A e^{-\int f(t)\,\mathrm dt} + f(t) \cdot A e^{-\int f(t)\,\mathrm dt} = 0</math>
 
Some elaboration is needed because ''&fnof;''(''t'') might not even be integrable. One must also assume something about the domains of the functions involved before the equation is fully defined. The solution above assumes the [[real number|real]] case.
Line 38:
If <math>f(t)=\alpha</math> is a constant, the solution is particularly simple, <math>y = A e^{-\alpha t}</math> and describes, e.g., if <math>\alpha>0</math>, the exponential decay of radioactive material at the macroscopic level. If the value of <math>\alpha</math> is not known a priori, it can be determined from two measurements of the solution. For example,
 
:<math>\frac{\mathrm dy}{\mathrm dt} + \alpha y = 0, y(1)=2, y(2)=1</math>
 
gives <math>\alpha = \ln(2)</math> and <math>y = 4 e^{-\ln(2) t}= 2^{2-t}</math>.
 
==Non-separable (non-homogeneous) first-order linear ordinary differential equations==
First-order linear non-homogeneous ODEs (ordinary [[differential equation]]s) are not separable. They can be solved by the following approach, known as an ''[[integrating factor]]'' method. Consider first-order linear ODEs of the general form:
 
:<math>\frac{\mathrm dy}{\mathrm dx} + p(x)y = q(x)</math>
 
The method for solving this equation relies on a special integrating factor, ''&mu;'':
 
:<math>\mu = e^{\int_{x_0}^x p(t)\, \mathrm dt}</math>
 
We choose this integrating factor because it has the special property that its derivative is itself times the function we are integrating, that is:
 
:<math>\frac{\mathrm d{\mu}}{\mathrm dx} = e^{\int_{x_0}^x p(t)\, \mathrm dt} \cdot p(x) = \mu p(x)</math>
 
Multiply both sides of the original differential equation by ''&mu;'' to get:
 
:<math>\mu{\frac{\mathrm dy}{\mathrm dx}} + \mu{p(x)y} = \mu{q(x)}</math>
 
Because of the special ''&mu;'' we picked, we may substitute d''d&mu;''/d''dxx'' for ''&mu;''&nbsp;''p''(''x''), simplifying the equation to:
 
:<math>\mu{\frac{\mathrm dy}{\mathrm dx}} + y{\frac{\mathrm d{\mu}}{\mathrm dx}} = \mu{q(x)}</math>
 
Using the [[product rule (calculus)|product rule]] in reverse, we get:
 
:<math>\frac{\mathrm d}{\mathrm dx}{(\mu{y})} = \mu{q(x)}</math>
 
Integrating both sides:
 
:<math>\mu{y} = \left(\int\mu q(x)\, \mathrm dx\right) + C</math>
 
Finally, to solve for ''y'' we divide both sides by <math>\mu</math>:
 
:<math>y = \frac{\left(\int\mu q(x)\, \mathrm dx\right) + C}{\mu}</math>
 
Since ''&mu;'' is a function of ''x'', we cannot simplify any further directly.
Line 82:
Suppose a mass is attached to a spring which exerts an attractive force on the mass [[Proportionality (mathematics)|proportional]] to the extension/compression of the spring. For now, we may ignore any other forces ([[gravity]], [[friction]], etc.). We shall write the extension of the spring at a time ''t'' as&nbsp;''x''(''t''). Now, using [[Newton's laws of motion|Newton's second law]] we can write (using convenient units):
 
: <math>m\frac{\mathrm d^2x}{\mathrm dt^2} +kx=0,</math>
 
where ''m'' is the mass and ''k'' is the spring constant that represents a measure of spring stiffness. For simplicity's sake, let us take ''m=k'' as an example.
Line 94:
To determine the unknown constants ''A'' and ''B'', we need ''initial conditions'', i.e. equalities that specify the state of the system at a given time (usually&nbsp;''t''&nbsp;=&nbsp;0).
 
For example, if we suppose at ''t''&nbsp;=&nbsp;0 the extension is a unit distance (''x''&nbsp;=&nbsp;1), and the particle is not moving (d''dxx''/d''dtt''&nbsp;=&nbsp;0). We have
 
: <math>x(0) = A \cos 0 + B \sin 0 = A = 1, \, </math>
Line 109:
 
===A more complicated model===
The above model of an oscillating mass on a spring is plausible but not very realistic: in practice, [[friction]] will tend to decelerate the mass and have magnitude proportional to its velocity (i.e.&nbsp;d''dxx''/d''dtt''). Our new differential equation, expressing the balancing of the acceleration and the forces, is
 
: <math>m\frac{\mathrm d^2x}{\mathrm dt^2} + c \frac{\mathrm dx}{\mathrm dt} + kx=0,</math>
 
where <math>c</math> is the damping coefficient representing friction. Again looking for solutions of the form <math>Ce^{\lambda t}</math>, we find that