Differential equation: Difference between revisions

From Wikibase
Jump to navigation Jump to search
Implementing HTML-comment advice: general form before example for characteristic equations, complex-root demonstration, forced equations and variation of parameters shown with mathematics, step-by-step power-series and Laplace demonstrations. AI-assisted (RonzzWikiCowriter). (via update-page on MediaWiki MCP Server)
No edit summary
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''A differential equation''' is an equation that relates an unknown function to its own derivatives.  
'''A differential equation''' is an equation whose unknown is a function and which also involves that function's derivatives (rates of change). Where an ordinary equation such as $x^2=9$ is solved by numbers, a differential equation such as $y'+2y=0$ is solved by functions $y(x)$.


Two features are common to all differential equations:
A surprising number of laws of nature can be described by differential equations: pendulums, cooling drinks, growing populations, and discharging capacitors.


* the unknown is a function, not a number;
== General and specific solution ==
* a solution is rarely unique, but instead often a family of functions containing arbitrary constants. A particular member of the solution family can be singled out by extra conditions, such as the state of the system at some time;


== Types of differential equations ==
The simplest differential equation prescribes the slope of a function $y(x)$:


=== Ordinary and partial differential equations ===
$$\frac{dy}{dx}=2x$$


==== Ordinary differential equations ====
Integrating both sides gives


An '''ordinary differential equation''' (ODE) describes an unknown function which depends on a single independent variable.
$$\int\frac{dy}{dx}\,dx=\int 2x\,dx\qquad\Longrightarrow\qquad y(x)=x^{2}+C$$


Writing the unknown as ''y''(''x''), an ODE can be expressed in its implicit form:
Where $C$ is an unknown constant. Therefore, the solution is not one single function, but a family of functions, known as the '''general solution'''.


{{#content:Q1580}}
If we know the value of $y$ at a particular $x$, for instance, $y(0)=3$, then a '''particular solution''' function can be identified


where ''F'' is a given function.
$$3=0^2+C\qquad\Longrightarrow\qquad C=3\qquad\Longrightarrow\qquad y=x^2+3$$


If the equation can be solved for the highest derivative, it takes an explicit form.
A prescribed value such as $y(a)=b$ allowing us to pin down a particular solution is called an '''initial condition'''.


For a first-order equation:
== Classifying differential equations ==


{{#content:Q1581}}
A differential equation can be classified by three criteria: its '''order''', its '''linearity''', and how many independent variables it involves.
 
=== Order ===
 
The order is the order of the highest derivative present.
 
$\frac{dy}{dx}=2x$ is first order, whereas Newton's second law,
 
{{#content:Q1583}}


The right-hand side ''f''(''x'', ''y'') prescribes the slope that any solution function must have at the point (''x'', ''y'').
is second order ($x(t)$ position of mass $m$, $F$ net force).


For an equation of order ''n'' that is solved for its highest derivative:
=== Linearity and homogeneity ===


{{#content:Q1603}}
An equation is '''linear''' when the unknown and its derivatives appear only to the first power and never multiplied together. A linear first-order equation can always be written


Integrating the equation once removes one derivative and introduces one arbitrary constant. Therefore, a problem of order ''n'' generally needs ''n'' conditions to single out one particular solution of the solution family.
$$\frac{dy}{dx}+p(x)\,y=q(x)$$


==== Partial differential equations ====
It is said to be '''homogeneous''' when $q(x)=0$.


A '''partial differential equation''' describes an unknown function that depends on two or more independent variables. Its general form is:
<blockquote>
The equations $dy/dx=y^2$ and $d^2\theta/dt^2+\sin\theta=0$ are nonlinear (square of $y$; sine of $\theta$).
</blockquote>


{{#content:Q1604}}
An important property of linear homogeneous equation is the '''superposition principle'''. If $y_1,y_2$ solve a homogeneous linear equation, so does $c_1y_1+c_2y_2$.


=== Order and linearity ===
For a nonlinear equation, the same principle usually does not apply: if $y'=y^2$ has two solutions $y_1'=y_1^2$ and $y_2'=y_2^2$


The '''order''' of a differential equation is the order of the highest derivative that appears in it.
$$(y_1+y_2)'=y_1^2+y_2^2\neq (y_1+y_2)^2$$


A differential equation is '''linear''' if the unknown function and its derivatives appear only to the first power and are never multiplied together (they may be multiplied by functions of the independent variables).
so $y_1+y_2$ does not solve $y'=y^2$.


An ''n''-th order linear ODE therefore has the form
=== Ordinary and partial ===


{{#content:Q1605}}
An '''ordinary differential equation''' (ODE) has one independent variable. A '''partial differential equation''' (PDE) has several, with partial derivatives. All the examples we have seen above are ordinary differential equations. For an example of a partial differential equation, we can take the heat equation describing the temperature $u$ of an insulated metal bar, according to position $x$ on the metal bar and time $t$


We consider this equation homogeneous when ''g''(''x'') = 0.
{{#content:Q1590}}


Linear homogeneous equations obey the superposition principle: any linear combination of solutions is again a solution.
where $\alpha$ is the thermal diffusivity.


== Differential equations as mathematical models ==
== Direction field ==


=== Mechanics ===
A first-order equation can be written


==== Force and acceleration ====
{{#content:Q1581}}


Newton's second law of motion states that the acceleration of a body is proportional to the net force acting on it:
assigning to each point $(x,y)$ the slope $f(x,y)$ a solution must have there. Drawing short segments of that slope gives a '''direction field'''. Solution curves must run tangent to the direction field for every point they pass through.


{{#content:Q1583}}
[[File:Slope field of exponential growth.png|thumb|Direction field of $dy/dx=y$. Credit: jjbeard (public domain).]]


where ''x''(''t'') is the position of the body, ''m'' its mass, and the force ''F'' may itself depend on time, position and velocity.
== Solving differential equations ==


==== Harmonic oscillations ====
Just like there is no general formula solving all algebraic equations, there is no general method permitting the solution of all differential equations. However, some standard methods exist for solving a restricted class of simple differential equations.


For a mass attached to a spring whose restoring force is linear in the displacement, this becomes the harmonic oscillator equation:
=== First-order ODEs ===


{{#content:Q1588}}
==== Method 1: separable equations ====


whose solutions are sinusoidal oscillations at the natural frequency ω₀; such motion is called simple harmonic motion.
'''General case.''' A first-order equation is separable when it can be rewritten as the equality of the derivative to the product of two functions, one containing only $x$, one containing only $y$.


[[File:Simple harmonic motion animation.gif|thumb|A mass on a spring executing simple harmonic motion, the solution of the harmonic oscillator equation. Credit: Evil saltine (public domain).]]
{{#content:Q1612}}


=== Exponential growth and decay ===
after which both integrals can be evaluated directly.


A quantity that changes at a rate proportional to its current size satisfies the exponential growth or decay equation:
'''Example: exponential growth and decay.''' A quantity whose rate of change is proportional to its own size, such as an unchecked population or a radioactive sample, obeys


{{#content:Q1584}}
{{#content:Q1584}}


Its solutions are exponentials:
Separating variables and integrating,


{{#content:Q1585}}
$$\int\frac{dy}{y}=\int k\,dt\;\Longrightarrow\;\ln|y|=kt+C_1\;\Longrightarrow\;y=Ce^{kt}$$


When ''k'' &gt; 0, it can describe a population with unlimited resources that grows exponentially, whereas ''k'' &lt; 0 describes a radioactive substance that decays exponentially towards zero.
The initial condition $y(0)=y_0$ fixes $C=y_0$, giving


=== Heat transfer ===
{{#content:Q1585}} (1)


Newton's law of cooling describes a body whose temperature ''T'' differs from a constant ambient temperature ''T''ₐ:
Observing (1) we notice this is very well an exponential growth (k>0)/decay(k<0).
 
'''Example: Newton's law of cooling.''' A hot object in a cooler room loses heat through its surface, and the larger the temperature gap, the faster it cools: The temperature of the object is modelled by


{{#content:Q1586}}
{{#content:Q1586}}


The temperature difference decays exponentially, so the body approaches the ambient temperature but never quite reaches it.<ref>{{#cite:Q1576}}</ref>
Separating variables and integrating,
 
$$\int\frac{dT}{T-T_a}=-k\int dt\;\Longrightarrow\;\ln|T-T_a|=-kt+C\;\Longrightarrow\;T-T_a=Ce^{-kt}$$
 
so with $T(0)=T_0$, hence $C=T_0-T_a$,
 
$$T(t)=T_a+(T_0-T_a)e^{-kt}$$
 
==== Method 2: linear first-order equations (integrating factor) ====
 
'''General case.''' For the linear equation
 
$$y'+p(x)\,y=q(x)$$
 
introduce the integrating factor $\mu=e^{\int p\,dx}$, chosen so that $\mu'=p\mu$; multiplying by $\mu$ collapses the left-hand side into a single derivative:
 
{{#content:Q1613}}
 
Integrating both sides,
 
$$\mu y=\int\mu\,q\,dx+C\;\Longrightarrow\;y=\frac{1}{\mu}\int\mu\,q\,dx+\frac{C}{\mu}$$
 
If you notice, the first term $y=\frac{1}{\mu}\int\mu\,q\,dx$$\frac{C}{\mu}$ provides one particular solution to the non-homogeneous equation, and the second term, $C/\mu=Ce^{-\int p\,dx}$, is a solution to the homogeneous counter par of the original equation: $y'+p(x)\,y=0$. It generalises the solution to the entire solution family.
 
This is in fact a general principle: $y=y_p+y_h$, i.e., the solution family of a non-homogeneous equation is the sum of one particular solution plus the solution to its homogeneous counterpart.
 
To see the method in action, consider
 
$$ \frac{dy}{dx} + \frac{1}{x}\,y = x^2, \qquad x>0. $$
 
Here $P(x)=1/x$, so


== Geometry of first-order equations ==
$$ \mu(x)=e^{\int \frac{1}{x}\,dx}=e^{\ln x}=x. $$


=== Direction fields ===
Multiply the whole equation by $\mu(x)=x$:


As described above, a first-order equation can be written explicitly
$$ x\frac{dy}{dx} + y = x^3. $$


{{#content:Q1581}}
The left side is exactly the derivative of the product $x\,y$:


which assigns to every point (''x'', ''y'') the slope that a solution curve must have there.
$$ \frac{d}{dx}\bigl(xy\bigr) = x^3. $$


Drawing a short line segment of that slope at many points produces a direction field (or slope field). Every solution curve must stay tangent to the field directions everywhere.
Integrate with respect to $x$:


[[File:Slope field of exponential growth.png|thumb|Direction field of the equation d''y''/d''x'' = ''y'', with several solution curves. Each segment shows the local slope; the solutions are exponential curves. Credit: jjbeard (public domain).]]
$$ xy = \int x^3\,dx = \frac{x^4}{4} + C. $$


As such, direction fields can visualise the qualitative behaviour of solutions.<ref>{{#cite:Q1576}}</ref>
Finally, divide by $x$ to obtain the general solution:


== Solving differential equations ==
$$ y = \frac{x^3}{4} + \frac{C}{x}. $$


Solutions to differential equations can be classified into 3 categories:
A quick substitution verifies that this function family satisfies the original equation. The arbitrary constant $C$ can be determined later if an initial condition $y(x_0)=y_0$ is given.


* '''Closed-form solution''': a finite combination of elementary functions (polynomials, rational functions, exponentials, logarithms, trigonometric functions and their inverses) built with the usual algebraic operations, which can be evaluated directly at a given point. Only a small fraction of differential equations admit a closed-form solution.
==== Method 3: constant-coefficient linear equations (trial solutions) ====


* '''Open form solution''': a combination of elementary functions, and/or infinite series (a power series or a Fourier series) or special functions defined by such series, and integrals.
=== Second-order ODEs ===


* '''numerical estimation''': approximation of the real solution to a desired accuracy.
==== Method 1: direct integration ====


=== Analytical methods ===
'''General case.''' For $y''=f(x)$,


Classical methods convert the equation into simpler, solvable pieces, giving a closed form when possible and a series or an integral otherwise.
$$y''=f(x)\;\Longrightarrow\;y'=\int f(x)\,dx+C_1\;\Longrightarrow\;y=\int\!\!\left(\int f(x)\,dx\right)dx+C_1x+C_2$$


==== linear first order equations ====
and likewise $y^{(n)}=f(x)$ by $n$ integrations.


'''Separation of variables:''' Reorganise by variable and reintegrate:
'''Example: free fall.''' A ball released above the ground falls under gravity alone, which accelerates it downward at the constant rate $g\approx 9.8\ \mathrm{m\,s^{-2}}$; Newton's second law gives the second-order equation $x''=-g$, of the form above with $f(x)=-g$. Integrating twice,


{{#content:Q1612}}
$$x''=-9.8\;\Longrightarrow\;\frac{dx}{dt}=-9.8t+v_0\;\Longrightarrow\;x(t)=-4.9t^2+v_0t+x_0$$


For the equation d''y''/d''x'' = −''x''/''y'', this gives the family of circles:
Numeric scenario: the ball is dropped from rest, $v_0=0$, at height $x_0=19.6\ \mathrm{m}$. It reaches the ground, $x=0$, when


{{#content:Q1606}}
$$0=19.6-4.9t^2\;\Longrightarrow\;t=\sqrt{19.6/4.9}=2\ \text{s}$$


'''Integrating factors.'''
so the two initial conditions have pinned down the whole trajectory.


{{#content:Q1613}}
==== Method 2: linear equations with constant coefficients ====


For instance:
'''General case.'''


{{#content:Q1607}}
$$y''+a\,y'+b\,y=f(x)$$


'''Characteristic equations.''' For a linear equation with constant coefficients, the trial solution ''y'' = ''e''<sup>''rx''</sup> reduces the differential equation to an algebraic characteristic equation. In general, for the second-order equation ''y''″ + ''ay''′ + ''by'' = 0:
'''Homogeneous case ($f=0$).''' The exponential trial $y=e^{rx}$,


{{#content:Q1644}}
{{#content:Q1644}}


For the example
gives the characteristic equation $r^2+ar+b=0$, whose roots determine $y_h$:


{{#content:Q1621}}
* $r_1\neq r_2$ real: $y_h=C_1e^{r_1x}+C_2e^{r_2x}$;
* $r_1=r_2=r$: $y_h=(C_1+C_2x)e^{rx}$;
* $r=\alpha\pm i\beta$: $y_h=e^{\alpha x}(C_1\cos\beta x+C_2\sin\beta x)$.


whose characteristic roots ''r'' = 1 and ''r'' = 2 are real and distinct, each root contributes one exponential, and the general solution is the sum
'''Non-homogeneous case ($f\neq 0$).''' $y=y_h+y_p$, with $y_p$ found by undetermined coefficients as in Method 3.
 
'''Worked demonstration (homogeneous).''' $y''-3y'+2y=0$: $r^2-3r+2=(r-1)(r-2)=0$,


{{#content:Q1608}}
{{#content:Q1608}}


When the roots form a complex-conjugate pair ''r'' = α ± iβ, Euler's formula merges the two complex exponentials into real oscillations, and the general solution is
Check: $e^x$ gives $(1-3+2)e^x=0$.


{{#content:Q1645}}
'''Worked demonstration (non-homogeneous).''' $y''-3y'+2y=2e^{3x}$: keep $y_h$ above, try $y_p=Ae^{3x}$:


For the harmonic oscillator ''y''″ + ''y'' = 0, the characteristic roots are ''r'' = ±i, so the general solution is sinusoidal:
$$y_p''-3y_p'+2y_p=(9-9+2)Ae^{3x}=2Ae^{3x}\;\Longrightarrow\;A=1$$


{{#content:Q1653}}
$$y=C_1e^x+C_2e^{2x}+e^{3x}$$


A '''forced''' (or non-homogeneous) linear equation is one whose right-hand side is a non-zero function ''g''(''x''), the forcing term, which drives the system from outside, as a driving force drives an oscillator. Its general solution is the sum of the complementary solution ''y''<sub>c</sub>, the general solution of the homogeneous equation that carries the two arbitrary constants, and one particular solution ''y''<sub>p</sub> of the full equation:
'''Example: the harmonic oscillator (a mass on a spring).''' A mass attached to a spring is pulled back towards its rest position by a force $-kx$ proportional to the displacement (Hooke's law); once released it oscillates. Newton's second law models the motion,


{{#content:Q1646}}
$$m\frac{d^2x}{dt^2}=-kx\;\Longrightarrow\;x''+\omega_0^2x=0,\qquad \omega_0=\sqrt{\frac{k}{m}}$$


'''Variation of parameters''' is a general way to construct ''y''<sub>p</sub> from the homogeneous solutions ''y''₁ and ''y''₂: replace the constants in ''y''<sub>c</sub> = ''C''₁''y''₁ + ''C''₂''y''₂ by unknown functions ''u''₁(''x''), ''u''₂(''x''), and impose the two conditions that make ''y''<sub>p</sub> = ''u''₁''y''₁ + ''u''₂''y''₂ solve the forced equation:
{{#content:Q1588}}
 
The trial $x=e^{rt}$ gives the characteristic equation $r^2+\omega_0^2=0$ with roots $r=\pm i\omega_0$, the complex-pair case with $\alpha=0$, hence
 
$$x(t)=A\cos\omega_0t+B\sin\omega_0t$$
 
with $A,B$ fixed by the initial position and velocity.


{{#content:Q1647}}
[[File:Simple harmonic motion animation.gif|thumb|A mass on a spring: the harmonic oscillator solution is a sinusoid of fixed amplitude. Credit: Evil saltine (public domain).]]


Solving this 2×2 linear system for ''u''₁′ and ''u''₂′, by dividing by the Wronskian ''W'' = ''y''₁''y''₂′ − ''y''₂''y''₁′, and integrating, gives the functions ''u''₁ and ''u''₂. For the forced example ''y''″ − 3''y''′ + 2''y'' = ''e''<sup>''x''</sup>, whose homogeneous solutions are ''y''₁ = ''e''<sup>''x''</sup> and ''y''₂ = ''e''<sup>2''x''</sup>:
Numeric scenario: a mass $m=2\ \mathrm{kg}$ hangs on a spring with $k=8\ \mathrm{N\,m^{-1}}$, so $\omega_0=\sqrt{8/2}=2\ \mathrm{rad\,s^{-1}}$ and the displacement obeys $x''+4x=0$. Pulled $0.10\ \mathrm{m}$ from rest and released, the conditions $x(0)=0.10$, $x'(0)=0$ give $A=0.10$, $B=0$:


{{#content:Q1648}}
$$x(t)=0.10\cos 2t\ \mathrm{m},\qquad P=\frac{2\pi}{\omega_0}=\pi\approx 3.14\ \text{s}$$


Thus ''u''₁′ = −1 and ''u''₂′ = ''e''<sup>−''x''</sup>, so ''u''₁ = −''x'' and ''u''₂ = −''e''<sup>−''x''</sup>. The resulting function −''xe''<sup>''x''</sup> − ''e''<sup>''x''</sup> contains the homogeneous solution ''e''<sup>''x''</sup>, which is absorbed into ''C''₁, leaving the particular solution ''y''<sub>p</sub> = −''xe''<sup>''x''</sup> and the general solution ''y'' = ''C''₁''e''<sup>''x''</sup> + ''C''₂''e''<sup>2''x''</sup> − ''xe''<sup>''x''</sup>.
After one second $x(1)=0.10\cos 2\approx -0.042\ \mathrm{m}$, and the motion is '''simple harmonic motion'''.<ref>{{#cite:Q1577}}</ref>


'''Power series.''' When the coefficients vary with ''x'', a solution is sought as a power series ''y'' = Σ''a''ₙ''x''<sup>''n''</sup>. Substituting the series and its derivatives into the equation and equating the coefficients of like powers of ''x'' converts the differential equation into recurrence relations that fix the ''a''ₙ one after another. For the Airy equation ''y''″ − ''xy'' = 0:
=== Partial differential equations ===


{{#content:Q1649}}
Two standard techniques give closed-form solutions of linear PDEs: separation of variables, for separable problems on bounded domains, and the method of characteristics, for first-order equations. The wave equation is also solved by the second technique, because its operator factors into two first-order parts. Both methods below are stated in general and then applied to a concrete equation.


so that ''a''₂ = 0 and, for ''n'' ≥ 1, each coefficient ''a''<sub>''n''+2</sub> is expressed in terms of ''a''<sub>''n''−1</sub>. The two free constants ''a''₀ and ''a''₁ therefore generate two independent solutions:
==== Method 1: separation of variables ====


{{#content:Q1650}}
'''General form.''' For a linear homogeneous PDE in two variables on a bounded domain with homogeneous boundary conditions, seek a solution of the separated form


These are, up to normalisation, the two Airy functions:
$$u(x,t)=X(x)\,T(t)$$


{{#content:Q1609}}
Substituting into the PDE and dividing by $XT$ separates the variables into one ordinary differential equation in $x$ and one in $t$. Since the two sides are functions of different variables, they can be identically equal only if each equals the same constant, the separation constant $-\lambda$. The $x$-equation together with the boundary conditions is an eigenvalue problem: only a discrete sequence of constants $\lambda_n$, with eigenfunctions $X_n(x)$, is admissible. The $t$-equation then has a solution $T_n(t)$ for each $n$, and every product $X_nT_n$ solves the PDE.


Because these series converge for every ''x'', the Airy equation, which has no elementary closed-form solution, is solved exactly in open form. About a '''regular singular point''', where the equation's own coefficients have poles, the '''Frobenius''' method extends the same idea to series with a shifted leading power ''x''<sup>ρ</sup>.
'''General algebraic solution.''' The PDE is linear and homogeneous, so the separated modes superimpose:


'''Laplace transforms.''' The transform turns differentiation into multiplication by the transform variable ''s'', so an initial value problem becomes an algebraic equation for ''Y''(''s''):
$$u(x,t)=\sum_n c_n\,X_n(x)\,T_n(t)$$


{{#content:Q1620}}
with the coefficients $c_n$ chosen so that the series equals the initial profile $u(x,0)$; orthogonality of the eigenfunctions $X_n$ determines them.


The procedure is mechanical: transform each term of the equation using the initial values, solve the resulting algebraic equation for ''Y''(''s''), expand the answer in partial fractions, and invert each term with a table of standard transforms. For ''y''″ + ''y'' = 1 with ''y''(0) = ''y''′(0) = 0, transforming both sides gives
'''Example: the heat equation.''' The temperature of a bar of length $L$ with insulated sides and both ends held at $0$ obeys


{{#content:Q1651}}
$$\frac{\partial u}{\partial t}=\alpha\frac{\partial^2u}{\partial x^2},\qquad u(0,t)=u(L,t)=0$$


Solving for ''Y''(''s'') and expanding in partial fractions,
Substituting $u=X(x)T(t)$ gives $XT'=\alpha X''T$, and dividing by $\alpha XT$,


{{#content:Q1652}}
{{#content:Q1622}}


and inverting term by term, using the standard pairs ''1/s'' ↔ 1 and ''s''/(''s''² + 1) ↔ cos ''t'', recovers the solution:
The $t$-equation $T'=-\alpha\lambda T$ has solution $T=e^{-\alpha\lambda t}$, and the $x$-equation


{{#content:Q1610}}
$$X''=-\lambda X\;\Longrightarrow\;X=A\cos(\sqrt\lambda\,x)+B\sin(\sqrt\lambda\,x)$$


'''Separation of variables for PDEs.''' With the product ansatz ''u''(''x'', ''t'') = ''X''(''x'')''T''(''t''), a linear PDE splits into ordinary equations tied together by a separation constant λ:
together with the boundary conditions forces $X(0)=X(L)=0$: hence $A=0$ and $\sin(\sqrt\lambda\,L)=0$, so $\sqrt\lambda\,L=n\pi$, $n=1,2,\dots$. Each $\lambda=(n\pi/L)^2$ gives one mode


{{#content:Q1622}}
$$u_n(x,t)=\sin\frac{n\pi x}{L}\,e^{-\alpha(n\pi/L)^2t}$$


Superposition of the product solutions then fits the initial data. For the heat equation on a rod of length ''L'' whose ends are held at temperature zero, this gives the Fourier sine series
and the general algebraic solution above becomes


{{#content:Q1611}}
{{#content:Q1611}}


whose terms decay at rates set by the thermal diffusivity α.
with $b_n$ determined by the Fourier sine series of the initial profile $u(x,0)$; the decay rate $\alpha(n\pi/L)^2$ grows as $n^2$.
 
Numeric scenario: a $1\ \mathrm{m}$ iron bar, heated so that its centre is at $100\,^{\circ}\mathrm{C}$ while both ends are held at $0\,^{\circ}\mathrm{C}$, cools by conduction with iron's diffusivity $\alpha\approx 2.3\times10^{-5}\ \mathrm{m^2s^{-1}}$. The initial profile $u(x,0)=100\sin(\pi x/L)$ is exactly the first mode, so only $n=1$ contributes and
 
$$u(x,t)=100\sin\frac{\pi x}{L}\,e^{-\alpha\pi^2t/L^2}$$
 
At the centre, with $L=1$ and $\alpha\pi^2\approx 2.3\times10^{-4}\ \text{s}^{-1}$,
 
$$u\!\left(\tfrac12,t\right)=100\,e^{-2.3\times10^{-4}t}$$
 
so after one hour $u\approx 100e^{-0.82}\approx 44\,^{\circ}\mathrm{C}$, and $50\,^{\circ}\mathrm{C}$ is reached at $t=\ln 2/(2.3\times10^{-4})\approx 3050\ \text{s}\approx 51$ min.<ref>{{#cite:Q1579}}</ref>
 
==== Method 2: the method of characteristics ====
 
'''General form.''' The method of characteristics solves first-order PDEs by tracing curves along which the PDE reduces to ordinary differential equations. In two independent variables the general quasilinear first-order equation is
 
$$A(x,t,u)\,u_x+B(x,t,u)\,u_t=C(x,t,u)$$
 
A solution $u=u(x,t)$ is a surface in $(x,t,u)$-space. Its tangent plane at each point is spanned by $(1,0,u_x)$ and $(0,1,u_t)$, so a vector $(A,B,C)$ is tangent to the surface exactly when $C=A u_x+B u_t$, the condition expressed by the PDE itself. The solution surface is therefore swept out by the integral curves of the vector field $(A,B,C)$, the characteristic curves, which solve the characteristic system of ordinary differential equations
 
$$\frac{dx}{ds}=A(x,t,u),\qquad \frac{dt}{ds}=B(x,t,u),\qquad \frac{du}{ds}=C(x,t,u)$$
 
Given data on a curve that is not itself characteristic, such as $u(x,0)=u_0(x)$, one characteristic issues from each point of the curve, and integrating the system carries the data across the region the characteristics cover. For the linear homogeneous case
 
$$a(x,t)\,u_x+b(x,t)\,u_t=0$$
 
the $x$- and $t$-equations do not involve $u$, and the third gives $du/ds=0$: the solution is constant along each characteristic. The characteristics form a one-parameter family; let $\psi(x,t)=\text{const}$ be a first integral, a function constant on each member of the family.


The theory of these methods is treated in standard textbooks on ordinary and partial differential equations.<ref>{{#cite:Q1577}}</ref><ref>{{#cite:Q1579}}</ref> Still, only a minority of differential equations, almost all of them linear, can be solved explicitly; most equations that arise in applications are treated by numerical or qualitative methods.<ref>{{#cite:Q1578}}</ref>
'''General algebraic solution.''' Since $u$ is constant on every characteristic and the characteristics are the level sets of $\psi$, the general solution is an arbitrary function of the first integral,


=== Numerical methods ===
$$u(x,t)=F\bigl(\psi(x,t)\bigr)$$


When no closed-form solution is available, solutions are approximated by numerical integration. Euler's method replaces the exact increment with the first-order Taylor approximation:
with $F$ fixed by the initial data. When the right-hand side of the PDE is nonzero, $u$ changes along a characteristic at the rate $C$ (or of the given source term), so the general solution acquires an integral of that term along the curve.


{{#content:Q1615}}
'''Example: transport of a pollutant.''' For constant coefficients $c$ the equation $u_t+c\,u_x=0$ has characteristics $dx/dt=c$, the straight lines $x-ct=\text{const}$; hence $\psi=x-ct$, and the general algebraic solution is the travelling wave


and advances an approximate solution ''y''ₙ at points ''x''ₙ = ''x''₀ + ''nh'' by repeatedly applying one step:
$$u(x,t)=F(x-ct),\qquad u(x,0)=F(x)$$


{{#content:Q1593}}
A river flows steadily at speed $c=2\ \mathrm{m\,s^{-1}}$, and a factory releases a concentrated slug of pollutant at one point; as long as mixing and diffusion are negligible, the current simply carries the whole slug downstream without changing it. The concentration obeys $u_t+2u_x=0$ with the Gaussian initial profile


[[File:Euler method.svg|thumb|Euler's method approximates a solution curve by following the local slope over short steps; smaller steps follow the exact curve more closely. Credit: Oleg Alexandrov (public domain).]]
$$u(x,0)=50\,e^{-(x/10)^2}\ \mathrm{mg\,L^{-1}}$$


The error committed in one step is proportional to ''h''², so over the 1/''h'' steps spanning a fixed interval the accumulated error is proportional to ''h''. For the model problem d''y''/d''x'' = ''y'' with ''y''(0) = 1, whose exact solution is ''y'' = ''e''<sup>''x''</sup>, each Euler step multiplies the estimate by 1 + ''h'':
(peak $50\ \mathrm{mg\,L^{-1}}$ at the release point, falling by $e^{-1}$ ten metres away). The solution above gives


{{#content:Q1614}}
$$u(x,t)=50\,e^{-((x-2t)/10)^2}\ \mathrm{mg\,L^{-1}}$$


so at ''x'' = 1 the estimate (1 + ''h'')<sup>1/''h''</sup> tends to ''e'' as ''h'' → 0, and the polygonal approximation converges to the exact solution. More accurate and more stable methods, such as the '''Runge–Kutta family''', remove the low-order error terms by combining several slope evaluations per step, and are implemented in essentially every numerical computing environment.<ref>{{#cite:Q1576}}</ref>
After one minute the peak has moved from $x=0$ to $x=ct=120\ \mathrm{m}$, still reading $50\ \mathrm{mg\,L^{-1}}$; pure transport does not spread the slug, which would require the second-order term $\alpha u_{xx}$ of the heat equation. With a source $q(x,t)$, the value accumulates along each characteristic:


=== Qualitative methods ===
$$u(x,t)=F(x-ct)+\int_0^t q\bigl(x-c(t-\tau),\tau\bigr)\,d\tau$$


For nonlinear equations, and especially for systems of two or more equations, the geometry of solutions matters as much as their formulas. Qualitative analysis begins with the equilibria, the points at which the system does not change, and determines their stability: a small perturbation away from a stable equilibrium decays back towards it, while the system leaves an unstable one.
'''Example: the wave equation.''' The wave equation


The undamped pendulum
$$u_{tt}=c^2u_{xx}$$


{{#content:Q1589}}
is second order, yet its operator factors into two first-order transport operators, so the method of characteristics still applies. Introduce the characteristic coordinates


has its downward position θ = 0 and its upright position θ = π as equilibria. Written as a first-order system in the phase plane (θ, ''v''),
$$\xi=x-ct,\qquad \eta=x+ct$$


{{#content:Q1617}}
in which the operator becomes $u_{tt}-c^2u_{xx}=-4c^2u_{\xi\eta}$, so the equation reads $u_{\xi\eta}=0$. Hence $u_\xi$ depends on $\xi$ alone, and one further integration gives the general algebraic solution (d'Alembert, 1747):


their stability follows by linearising about each equilibrium:
$$u(x,t)=f(x-ct)+g(x+ct)$$


{{#content:Q1618}}
a superposition of two travelling waves, one in each direction. The functions $f,g$ are fixed by the initial displacement and velocity: for a string released from rest with initial displacement $\phi(x)$, the conditions $u(x,0)=\phi(x)$ and $u_t(x,0)=0$ give $f=g=\phi/2$, so


At the downward position the linearised equation is the harmonic oscillator, and the phase plane is filled with the closed loops of periodic swinging; at the upright position the linearised equation has exponential solutions, a saddle through which the flow escapes.
$$u(x,t)=\frac{\phi(x-ct)+\phi(x+ct)}{2}$$


As a parameter changes, equilibria can appear, merge or vanish in a bifurcation. A harvested fish population obeys the harvested logistic equation
and the initial hump separates into two half-size copies travelling apart at speed $c$.<ref>{{#cite:Q1579}}</ref>


{{#content:Q1616}}
=== When no formula exists ===


which keeps two equilibria while the harvest ''H'' stays below ''H''<sub>c</sub> = ''rK''/4; at ''H''<sub>c</sub> they merge into one, and beyond it no equilibrium survives and the population collapses.
Most equations, especially nonlinear ones, fit none of the classes above and have no solution in terms of familiar functions. They are studied in one of three ways:<ref>{{#cite:Q1576}}</ref><ref>{{#cite:Q1578}}</ref>


In three or more dimensions a system can settle onto a chaotic attractor: its solutions stay bounded and deterministic, yet are aperiodic and so sensitive to initial conditions that nearby states diverge rapidly. Edward Lorenz found the first example in 1963 in the system that now bears his name,
* '''Numerically''', when numbers suffice: [[Euler's method]] steps along the slope field;
* '''[[Qualitative methods]]''': equilibria, stability and long-term behaviour, without formulas;
* '''Series and transforms''', for linear cases: [[Power series]] or the [[Laplace transform]].


{{#content:Q1619}}
<uml type="uml">
@startuml
skinparam monochrome true
start
:You have a differential equation;
if (First order and separable?\ny' = g(x) h(y)?) then (yes)
  :Separate and integrate:\n∫ dy/h(y) = ∫ g(x) dx;
else (no)
  if (First order and linear?\ny' + p(x) y = q(x)?) then (yes)
    if (Constant coefficients?\ny' + a y = q(x)?) then (yes)
      :Trial solution:\ny_h = C e^{-ax} + guessed y_p;
    else (no)
      :Integrating factor\nμ = e^{∫ p dx};
    endif
  else (no)
    if (Second order, of the form\ny'' = f(x)?) then (yes)
      :Integrate twice;
    else (no)
      if (Second order, linear, constant coefficients?\ny'' + a y' + b y = 0? or = f(x)?) then (yes)
        :Characteristic equation\nr² + a r + b = 0;\nthen add a particular y_p;
      else (no)
        if (Transport equation?\nu_t + c u_x = 0?) then (yes)
          :Travelling wave\nu(x,t) = f(x - ct);
        else (no)
          if (Linear PDE on a simple shape,\ne.g. the heat equation?) then (yes)
            :Separate variables\nu(x,t) = X(x) T(t);
          else (no)
            if (Are approximate numbers enough?) then (yes)
              :Numerical stepping\n(Euler's method);
            else (no)
              if (Linear?) then (yes)
                :Power series or Laplace transform;
              else (no)
                :Qualitative study:\nequilibria, stability, chaos;
              endif
            endif
          endif
        endif
      endif
    endif
  endif
endif
stop
@enduml
</uml>


which, for σ = 10, ρ = 28 and β = 8/3, traces the famous butterfly-shaped attractor. Chaos has since been found throughout physics, biology, chemistry and economics; it is why long-term weather prediction is impossible in practice.<ref>{{#cite:Q1578}}</ref>
The exact methods occupy the branches on the left; most equations encountered in research fall through to the routes on the right, each treated in its own article.


== History ==
== A short history ==


[[File:Isaac Newton portrait.jpg|thumb|left|Portrait of Isaac Newton (after Godfrey Kneller, 1689). Newton's laws of motion and of universal gravitation, published in the ''Principia'' (1687), are differential equations. Credit: James Thronill after Godfrey Kneller (public domain).]]
The origins of differential equations coincide with those of the calculus, since the calculus supplies the language in which rates of change are expressed and inverted. Newton's laws of motion and of universal gravitation, published in the ''Philosophiae Naturalis Principia Mathematica'' (1687), are differential equations; Newton treated them by the geometrical and infinite-series methods of his fluxional calculus. Although Newton developed a notation for fluxions, the differential notation $dy/dx$ introduced by Leibniz in the 1670s proved the more enduring: it exhibits the structure of the equation directly and is the notation adopted in this article.<ref>{{#cite:Q1577}}</ref>


Differential equations arose with the calculus that [[Person:Isaac Newton|Isaac Newton]] and [[Person:Gottfried Wilhelm Leibniz|Gottfried Wilhelm Leibniz]] developed independently in the late 17th century. Newton's laws of motion and of universal gravitation, published in his ''Principia'' of 1687, are differential equations. However, it was Leibniz who introduced the notation d''y''/d''x'' still used today.  
[[File:Isaac Newton portrait.jpg|thumb|left|Isaac Newton (portrait after Godfrey Kneller, 1689). Newton's laws of motion and of gravitation (''Principia'', 1687) are differential equations. Credit: James Thronill after Godfrey Kneller (public domain).]]


In the 18th century [[Person:Leonhard Euler|Leonhard Euler]] turned a collection of ad hoc tricks into a systematic theory, developing the general treatment of linear equations with constant coefficients, series methods, and the first numerical integration scheme, which still bears his name.<ref>{{#cite:Q1577}}</ref><ref>{{#cite:Q1576}}</ref>
The consolidation of these techniques into a systematic theory is due in large measure to [[Person:Leonhard Euler|Leonhard Euler]], whose work in the middle decades of the eighteenth century established the principal exact methods. Euler showed that linear equations with constant coefficients are solved by the substitution $y=e^{rx}$, which reduces the problem to an algebraic equation, and he advanced the theory of series solutions. For equations that admitted no closed-form solution, he introduced the step-by-step numerical procedure, described above as Euler's method, that bears his name. The exact methods presented in this article derive, in large part, from his work.<ref>{{#cite:Q1577}}</ref>


[[File:Leonhard Euler portrait.jpg|thumb|Leonhard Euler (portrait by Jakob Emanuel Handmann, 1753). Euler created much of the systematic theory of differential equations and gave his name to Euler's method. Credit: Jakob Emanuel Handmann (public domain).]]
[[File:Leonhard Euler portrait.jpg|thumb|Leonhard Euler (portrait by Jakob Emanuel Handmann, 1753). Credit: Jakob Emanuel Handmann (public domain).]]


Alongside the theory of ordinary equations, the 18th and 19th centuries saw the development of partial differential equations of physics. Jean le Rond d'Alembert wrote down and solved the one-dimensional wave equation for the vibrating string in the 1740s, and Joseph Fourier derived the heat equation from the physics of conduction and solved it with trigonometric series in his ''Théorie analytique de la chaleur'' of 1822, founding Fourier analysis.<ref>{{#cite:Q1579}}</ref> [[Person:Augustin-Louis Cauchy|Augustin-Louis Cauchy]] and, later, Rudolf Lipschitz and Émile Picard placed the existence and uniqueness of solutions on a rigorous footing.<ref>{{#cite:Q1576}}</ref> Henri Poincaré developed qualitative, geometric methods to study differential equations at the end of the 19th century to tackle the three-body problem of celestial mechanics. In 1892, Aleksandr Lyapunov gave a general definition of stability.
The theory of partial differential equations arose from the demands of eighteenth-century physics. In 1747, [[Person:Jean le Rond d'Alembert|Jean le Rond d'Alembert]] derived the wave equation for the vibrating string and established that its general solution consists of two waves propagating in opposite directions. The problem of heat conduction proved more demanding, because the initial temperature distribution of a conducting body is arbitrary. In his ''Théorie analytique de la chaleur'' (1822), [[Person:Joseph Fourier|Joseph Fourier]] derived the heat equation from the physical principles of conduction and solved it by expanding the initial data into a trigonometric series. This work established separation of variables as a standard technique of mathematical physics, and the Fourier series introduced for the purpose has since become fundamental to the analysis of periodic phenomena, from acoustics to signal processing.<ref>{{#cite:Q1579}}</ref>


The growing power of numerical computing in the 20th century enabled the development of the theory of dynamical systems that now pervades the sciences. In 1963, meteorologist Edward Lorenz found chaotic behaviour in a simple system of three differential equations modelling atmospheric convection, a landmark in the study of nonlinear dynamics. Although the 3-equation system was deterministic, its solutions were aperiodic and so sensitive to initial conditions that nearby states rapidly diverged. He popularised the phenomenon as the butterfly effect.<ref>{{#cite:Q1578}}</ref>
The limits of closed-form methods became apparent towards the end of the nineteenth century, and the later history of the subject is concerned principally with equations for which elementary solutions do not exist. In his investigation of the three-body problem of celestial mechanics, [[Person:Henri Poincaré|Henri Poincaré]] demonstrated that qualitative properties of the motion, such as its equilibria, stability, and long-term behaviour, can be characterised without solving the equations, thereby founding the qualitative theory of dynamical systems. The subsequent development of electronic computing made numerical approximation, of which Euler's method is the simplest instance, a routine and general technique. The two strands converged in 1963, when [[Person:Edward Lorenz|Edward Lorenz]], studying a simplified system of three ordinary differential equations that models atmospheric convection, established the phenomenon of deterministic chaos: although the equations are deterministic, their solutions are aperiodic and depend so sensitively on initial conditions that long-term weather prediction is not feasible in practice. These later approaches, qualitative analysis, numerical approximation, and series and transform methods, are treated in dedicated articles.<ref>{{#cite:Q1578}}</ref>


== References ==
== References ==

Latest revision as of 11:56, 7 September 2026

A differential equation is an equation whose unknown is a function and which also involves that function's derivatives (rates of change). Where an ordinary equation such as $x^2=9$ is solved by numbers, a differential equation such as $y'+2y=0$ is solved by functions $y(x)$.

A surprising number of laws of nature can be described by differential equations: pendulums, cooling drinks, growing populations, and discharging capacitors.

General and specific solution

The simplest differential equation prescribes the slope of a function $y(x)$:

$$\frac{dy}{dx}=2x$$

Integrating both sides gives

$$\int\frac{dy}{dx}\,dx=\int 2x\,dx\qquad\Longrightarrow\qquad y(x)=x^{2}+C$$

Where $C$ is an unknown constant. Therefore, the solution is not one single function, but a family of functions, known as the general solution.

If we know the value of $y$ at a particular $x$, for instance, $y(0)=3$, then a particular solution function can be identified

$$3=0^2+C\qquad\Longrightarrow\qquad C=3\qquad\Longrightarrow\qquad y=x^2+3$$

A prescribed value such as $y(a)=b$ allowing us to pin down a particular solution is called an initial condition.

Classifying differential equations

A differential equation can be classified by three criteria: its order, its linearity, and how many independent variables it involves.

Order

The order is the order of the highest derivative present.

$\frac{dy}{dx}=2x$ is first order, whereas Newton's second law,

m\frac{d^{2}x}{dt^{2}}=F

is second order ($x(t)$ position of mass $m$, $F$ net force).

Linearity and homogeneity

An equation is linear when the unknown and its derivatives appear only to the first power and never multiplied together. A linear first-order equation can always be written

$$\frac{dy}{dx}+p(x)\,y=q(x)$$

It is said to be homogeneous when $q(x)=0$.

The equations $dy/dx=y^2$ and $d^2\theta/dt^2+\sin\theta=0$ are nonlinear (square of $y$; sine of $\theta$).

An important property of linear homogeneous equation is the superposition principle. If $y_1,y_2$ solve a homogeneous linear equation, so does $c_1y_1+c_2y_2$.

For a nonlinear equation, the same principle usually does not apply: if $y'=y^2$ has two solutions $y_1'=y_1^2$ and $y_2'=y_2^2$

$$(y_1+y_2)'=y_1^2+y_2^2\neq (y_1+y_2)^2$$

so $y_1+y_2$ does not solve $y'=y^2$.

Ordinary and partial

An ordinary differential equation (ODE) has one independent variable. A partial differential equation (PDE) has several, with partial derivatives. All the examples we have seen above are ordinary differential equations. For an example of a partial differential equation, we can take the heat equation describing the temperature $u$ of an insulated metal bar, according to position $x$ on the metal bar and time $t$

\frac{\partial u}{\partial t}=\alpha\frac{\partial^{2}u}{\partial x^{2}}

where $\alpha$ is the thermal diffusivity.

Direction field

A first-order equation can be written

\frac{dy}{dx}=f(x,y)

assigning to each point $(x,y)$ the slope $f(x,y)$ a solution must have there. Drawing short segments of that slope gives a direction field. Solution curves must run tangent to the direction field for every point they pass through.

Direction field of $dy/dx=y$. Credit: jjbeard (public domain).

Solving differential equations

Just like there is no general formula solving all algebraic equations, there is no general method permitting the solution of all differential equations. However, some standard methods exist for solving a restricted class of simple differential equations.

First-order ODEs

Method 1: separable equations

General case. A first-order equation is separable when it can be rewritten as the equality of the derivative to the product of two functions, one containing only $x$, one containing only $y$.

\frac{dy}{dx}=g(x)\,h(y)\qquad\Longrightarrow\qquad\int\frac{dy}{h(y)}=\int g(x)\,dx

after which both integrals can be evaluated directly.

Example: exponential growth and decay. A quantity whose rate of change is proportional to its own size, such as an unchecked population or a radioactive sample, obeys

\frac{dy}{dt}=k\,y

Separating variables and integrating,

$$\int\frac{dy}{y}=\int k\,dt\;\Longrightarrow\;\ln|y|=kt+C_1\;\Longrightarrow\;y=Ce^{kt}$$

The initial condition $y(0)=y_0$ fixes $C=y_0$, giving

y(t)=y_{0}\,e^{kt} (1)

Observing (1) we notice this is very well an exponential growth (k>0)/decay(k<0).

Example: Newton's law of cooling. A hot object in a cooler room loses heat through its surface, and the larger the temperature gap, the faster it cools: The temperature of the object is modelled by

\frac{dT}{dt}=-k\bigl(T-T_{a}\bigr)

Separating variables and integrating,

$$\int\frac{dT}{T-T_a}=-k\int dt\;\Longrightarrow\;\ln|T-T_a|=-kt+C\;\Longrightarrow\;T-T_a=Ce^{-kt}$$

so with $T(0)=T_0$, hence $C=T_0-T_a$,

$$T(t)=T_a+(T_0-T_a)e^{-kt}$$

Method 2: linear first-order equations (integrating factor)

General case. For the linear equation

$$y'+p(x)\,y=q(x)$$

introduce the integrating factor $\mu=e^{\int p\,dx}$, chosen so that $\mu'=p\mu$; multiplying by $\mu$ collapses the left-hand side into a single derivative:

\frac{dy}{dx}+p(x)\,y=q(x),\text{multiply both sides by } \mu(x)=e^{\int p(x)\,dx}\;\Longrightarrow\;\frac{d}{dx}\bigl(\mu(x)\,y\bigr)=\mu(x)\,q(x)

Integrating both sides,

$$\mu y=\int\mu\,q\,dx+C\;\Longrightarrow\;y=\frac{1}{\mu}\int\mu\,q\,dx+\frac{C}{\mu}$$

If you notice, the first term $y=\frac{1}{\mu}\int\mu\,q\,dx$$\frac{C}{\mu}$ provides one particular solution to the non-homogeneous equation, and the second term, $C/\mu=Ce^{-\int p\,dx}$, is a solution to the homogeneous counter par of the original equation: $y'+p(x)\,y=0$. It generalises the solution to the entire solution family.

This is in fact a general principle: $y=y_p+y_h$, i.e., the solution family of a non-homogeneous equation is the sum of one particular solution plus the solution to its homogeneous counterpart.

To see the method in action, consider

$$ \frac{dy}{dx} + \frac{1}{x}\,y = x^2, \qquad x>0. $$

Here $P(x)=1/x$, so

$$ \mu(x)=e^{\int \frac{1}{x}\,dx}=e^{\ln x}=x. $$

Multiply the whole equation by $\mu(x)=x$:

$$ x\frac{dy}{dx} + y = x^3. $$

The left side is exactly the derivative of the product $x\,y$:

$$ \frac{d}{dx}\bigl(xy\bigr) = x^3. $$

Integrate with respect to $x$:

$$ xy = \int x^3\,dx = \frac{x^4}{4} + C. $$

Finally, divide by $x$ to obtain the general solution:

$$ y = \frac{x^3}{4} + \frac{C}{x}. $$

A quick substitution verifies that this function family satisfies the original equation. The arbitrary constant $C$ can be determined later if an initial condition $y(x_0)=y_0$ is given.

Method 3: constant-coefficient linear equations (trial solutions)

Second-order ODEs

Method 1: direct integration

General case. For $y''=f(x)$,

$$y''=f(x)\;\Longrightarrow\;y'=\int f(x)\,dx+C_1\;\Longrightarrow\;y=\int\!\!\left(\int f(x)\,dx\right)dx+C_1x+C_2$$

and likewise $y^{(n)}=f(x)$ by $n$ integrations.

Example: free fall. A ball released above the ground falls under gravity alone, which accelerates it downward at the constant rate $g\approx 9.8\ \mathrm{m\,s^{-2}}$; Newton's second law gives the second-order equation $x''=-g$, of the form above with $f(x)=-g$. Integrating twice,

$$x''=-9.8\;\Longrightarrow\;\frac{dx}{dt}=-9.8t+v_0\;\Longrightarrow\;x(t)=-4.9t^2+v_0t+x_0$$

Numeric scenario: the ball is dropped from rest, $v_0=0$, at height $x_0=19.6\ \mathrm{m}$. It reaches the ground, $x=0$, when

$$0=19.6-4.9t^2\;\Longrightarrow\;t=\sqrt{19.6/4.9}=2\ \text{s}$$

so the two initial conditions have pinned down the whole trajectory.

Method 2: linear equations with constant coefficients

General case.

$$y''+a\,y'+b\,y=f(x)$$

Homogeneous case ($f=0$). The exponential trial $y=e^{rx}$,

y''+a\,y'+b\,y=0,\qquad y=e^{rx}\ \Rightarrow\ r^{2}+a\,r+b=0

gives the characteristic equation $r^2+ar+b=0$, whose roots determine $y_h$:

  • $r_1\neq r_2$ real: $y_h=C_1e^{r_1x}+C_2e^{r_2x}$;
  • $r_1=r_2=r$: $y_h=(C_1+C_2x)e^{rx}$;
  • $r=\alpha\pm i\beta$: $y_h=e^{\alpha x}(C_1\cos\beta x+C_2\sin\beta x)$.

Non-homogeneous case ($f\neq 0$). $y=y_h+y_p$, with $y_p$ found by undetermined coefficients as in Method 3.

Worked demonstration (homogeneous). $y''-3y'+2y=0$: $r^2-3r+2=(r-1)(r-2)=0$,

y''-3y'+2y=0\qquad\Longrightarrow\qquad y=C_{1}e^{x}+C_{2}e^{2x}

Check: $e^x$ gives $(1-3+2)e^x=0$.

Worked demonstration (non-homogeneous). $y''-3y'+2y=2e^{3x}$: keep $y_h$ above, try $y_p=Ae^{3x}$:

$$y_p''-3y_p'+2y_p=(9-9+2)Ae^{3x}=2Ae^{3x}\;\Longrightarrow\;A=1$$

$$y=C_1e^x+C_2e^{2x}+e^{3x}$$

Example: the harmonic oscillator (a mass on a spring). A mass attached to a spring is pulled back towards its rest position by a force $-kx$ proportional to the displacement (Hooke's law); once released it oscillates. Newton's second law models the motion,

$$m\frac{d^2x}{dt^2}=-kx\;\Longrightarrow\;x''+\omega_0^2x=0,\qquad \omega_0=\sqrt{\frac{k}{m}}$$

\frac{d^{2}x}{dt^{2}}+\omega_{0}^{2}x=0

The trial $x=e^{rt}$ gives the characteristic equation $r^2+\omega_0^2=0$ with roots $r=\pm i\omega_0$, the complex-pair case with $\alpha=0$, hence

$$x(t)=A\cos\omega_0t+B\sin\omega_0t$$

with $A,B$ fixed by the initial position and velocity.

A mass on a spring: the harmonic oscillator solution is a sinusoid of fixed amplitude. Credit: Evil saltine (public domain).

Numeric scenario: a mass $m=2\ \mathrm{kg}$ hangs on a spring with $k=8\ \mathrm{N\,m^{-1}}$, so $\omega_0=\sqrt{8/2}=2\ \mathrm{rad\,s^{-1}}$ and the displacement obeys $x''+4x=0$. Pulled $0.10\ \mathrm{m}$ from rest and released, the conditions $x(0)=0.10$, $x'(0)=0$ give $A=0.10$, $B=0$:

$$x(t)=0.10\cos 2t\ \mathrm{m},\qquad P=\frac{2\pi}{\omega_0}=\pi\approx 3.14\ \text{s}$$

After one second $x(1)=0.10\cos 2\approx -0.042\ \mathrm{m}$, and the motion is simple harmonic motion.[1]

Partial differential equations

Two standard techniques give closed-form solutions of linear PDEs: separation of variables, for separable problems on bounded domains, and the method of characteristics, for first-order equations. The wave equation is also solved by the second technique, because its operator factors into two first-order parts. Both methods below are stated in general and then applied to a concrete equation.

Method 1: separation of variables

General form. For a linear homogeneous PDE in two variables on a bounded domain with homogeneous boundary conditions, seek a solution of the separated form

$$u(x,t)=X(x)\,T(t)$$

Substituting into the PDE and dividing by $XT$ separates the variables into one ordinary differential equation in $x$ and one in $t$. Since the two sides are functions of different variables, they can be identically equal only if each equals the same constant, the separation constant $-\lambda$. The $x$-equation together with the boundary conditions is an eigenvalue problem: only a discrete sequence of constants $\lambda_n$, with eigenfunctions $X_n(x)$, is admissible. The $t$-equation then has a solution $T_n(t)$ for each $n$, and every product $X_nT_n$ solves the PDE.

General algebraic solution. The PDE is linear and homogeneous, so the separated modes superimpose:

$$u(x,t)=\sum_n c_n\,X_n(x)\,T_n(t)$$

with the coefficients $c_n$ chosen so that the series equals the initial profile $u(x,0)$; orthogonality of the eigenfunctions $X_n$ determines them.

Example: the heat equation. The temperature of a bar of length $L$ with insulated sides and both ends held at $0$ obeys

$$\frac{\partial u}{\partial t}=\alpha\frac{\partial^2u}{\partial x^2},\qquad u(0,t)=u(L,t)=0$$

Substituting $u=X(x)T(t)$ gives $XT'=\alpha X''T$, and dividing by $\alpha XT$,

u=X(x)\,T(t)\ \Rightarrow\ \frac{X''}{X}=\frac{T'}{\alpha\,T}=-\lambda

The $t$-equation $T'=-\alpha\lambda T$ has solution $T=e^{-\alpha\lambda t}$, and the $x$-equation

$$X''=-\lambda X\;\Longrightarrow\;X=A\cos(\sqrt\lambda\,x)+B\sin(\sqrt\lambda\,x)$$

together with the boundary conditions forces $X(0)=X(L)=0$: hence $A=0$ and $\sin(\sqrt\lambda\,L)=0$, so $\sqrt\lambda\,L=n\pi$, $n=1,2,\dots$. Each $\lambda=(n\pi/L)^2$ gives one mode

$$u_n(x,t)=\sin\frac{n\pi x}{L}\,e^{-\alpha(n\pi/L)^2t}$$

and the general algebraic solution above becomes

u(x,t)=\sum_{n=1}^{\infty}b_{n}\sin\Bigl(\frac{n\pi x}{L}\Bigr)\,e^{-\alpha (n\pi/L)^{2}t}

with $b_n$ determined by the Fourier sine series of the initial profile $u(x,0)$; the decay rate $\alpha(n\pi/L)^2$ grows as $n^2$.

Numeric scenario: a $1\ \mathrm{m}$ iron bar, heated so that its centre is at $100\,^{\circ}\mathrm{C}$ while both ends are held at $0\,^{\circ}\mathrm{C}$, cools by conduction with iron's diffusivity $\alpha\approx 2.3\times10^{-5}\ \mathrm{m^2s^{-1}}$. The initial profile $u(x,0)=100\sin(\pi x/L)$ is exactly the first mode, so only $n=1$ contributes and

$$u(x,t)=100\sin\frac{\pi x}{L}\,e^{-\alpha\pi^2t/L^2}$$

At the centre, with $L=1$ and $\alpha\pi^2\approx 2.3\times10^{-4}\ \text{s}^{-1}$,

$$u\!\left(\tfrac12,t\right)=100\,e^{-2.3\times10^{-4}t}$$

so after one hour $u\approx 100e^{-0.82}\approx 44\,^{\circ}\mathrm{C}$, and $50\,^{\circ}\mathrm{C}$ is reached at $t=\ln 2/(2.3\times10^{-4})\approx 3050\ \text{s}\approx 51$ min.[2]

Method 2: the method of characteristics

General form. The method of characteristics solves first-order PDEs by tracing curves along which the PDE reduces to ordinary differential equations. In two independent variables the general quasilinear first-order equation is

$$A(x,t,u)\,u_x+B(x,t,u)\,u_t=C(x,t,u)$$

A solution $u=u(x,t)$ is a surface in $(x,t,u)$-space. Its tangent plane at each point is spanned by $(1,0,u_x)$ and $(0,1,u_t)$, so a vector $(A,B,C)$ is tangent to the surface exactly when $C=A u_x+B u_t$, the condition expressed by the PDE itself. The solution surface is therefore swept out by the integral curves of the vector field $(A,B,C)$, the characteristic curves, which solve the characteristic system of ordinary differential equations

$$\frac{dx}{ds}=A(x,t,u),\qquad \frac{dt}{ds}=B(x,t,u),\qquad \frac{du}{ds}=C(x,t,u)$$

Given data on a curve that is not itself characteristic, such as $u(x,0)=u_0(x)$, one characteristic issues from each point of the curve, and integrating the system carries the data across the region the characteristics cover. For the linear homogeneous case

$$a(x,t)\,u_x+b(x,t)\,u_t=0$$

the $x$- and $t$-equations do not involve $u$, and the third gives $du/ds=0$: the solution is constant along each characteristic. The characteristics form a one-parameter family; let $\psi(x,t)=\text{const}$ be a first integral, a function constant on each member of the family.

General algebraic solution. Since $u$ is constant on every characteristic and the characteristics are the level sets of $\psi$, the general solution is an arbitrary function of the first integral,

$$u(x,t)=F\bigl(\psi(x,t)\bigr)$$

with $F$ fixed by the initial data. When the right-hand side of the PDE is nonzero, $u$ changes along a characteristic at the rate $C$ (or of the given source term), so the general solution acquires an integral of that term along the curve.

Example: transport of a pollutant. For constant coefficients $c$ the equation $u_t+c\,u_x=0$ has characteristics $dx/dt=c$, the straight lines $x-ct=\text{const}$; hence $\psi=x-ct$, and the general algebraic solution is the travelling wave

$$u(x,t)=F(x-ct),\qquad u(x,0)=F(x)$$

A river flows steadily at speed $c=2\ \mathrm{m\,s^{-1}}$, and a factory releases a concentrated slug of pollutant at one point; as long as mixing and diffusion are negligible, the current simply carries the whole slug downstream without changing it. The concentration obeys $u_t+2u_x=0$ with the Gaussian initial profile

$$u(x,0)=50\,e^{-(x/10)^2}\ \mathrm{mg\,L^{-1}}$$

(peak $50\ \mathrm{mg\,L^{-1}}$ at the release point, falling by $e^{-1}$ ten metres away). The solution above gives

$$u(x,t)=50\,e^{-((x-2t)/10)^2}\ \mathrm{mg\,L^{-1}}$$

After one minute the peak has moved from $x=0$ to $x=ct=120\ \mathrm{m}$, still reading $50\ \mathrm{mg\,L^{-1}}$; pure transport does not spread the slug, which would require the second-order term $\alpha u_{xx}$ of the heat equation. With a source $q(x,t)$, the value accumulates along each characteristic:

$$u(x,t)=F(x-ct)+\int_0^t q\bigl(x-c(t-\tau),\tau\bigr)\,d\tau$$

Example: the wave equation. The wave equation

$$u_{tt}=c^2u_{xx}$$

is second order, yet its operator factors into two first-order transport operators, so the method of characteristics still applies. Introduce the characteristic coordinates

$$\xi=x-ct,\qquad \eta=x+ct$$

in which the operator becomes $u_{tt}-c^2u_{xx}=-4c^2u_{\xi\eta}$, so the equation reads $u_{\xi\eta}=0$. Hence $u_\xi$ depends on $\xi$ alone, and one further integration gives the general algebraic solution (d'Alembert, 1747):

$$u(x,t)=f(x-ct)+g(x+ct)$$

a superposition of two travelling waves, one in each direction. The functions $f,g$ are fixed by the initial displacement and velocity: for a string released from rest with initial displacement $\phi(x)$, the conditions $u(x,0)=\phi(x)$ and $u_t(x,0)=0$ give $f=g=\phi/2$, so

$$u(x,t)=\frac{\phi(x-ct)+\phi(x+ct)}{2}$$

and the initial hump separates into two half-size copies travelling apart at speed $c$.[2]

When no formula exists

Most equations, especially nonlinear ones, fit none of the classes above and have no solution in terms of familiar functions. They are studied in one of three ways:[3][4]

The exact methods occupy the branches on the left; most equations encountered in research fall through to the routes on the right, each treated in its own article.

A short history

The origins of differential equations coincide with those of the calculus, since the calculus supplies the language in which rates of change are expressed and inverted. Newton's laws of motion and of universal gravitation, published in the Philosophiae Naturalis Principia Mathematica (1687), are differential equations; Newton treated them by the geometrical and infinite-series methods of his fluxional calculus. Although Newton developed a notation for fluxions, the differential notation $dy/dx$ introduced by Leibniz in the 1670s proved the more enduring: it exhibits the structure of the equation directly and is the notation adopted in this article.[1]

Isaac Newton (portrait after Godfrey Kneller, 1689). Newton's laws of motion and of gravitation (Principia, 1687) are differential equations. Credit: James Thronill after Godfrey Kneller (public domain).

The consolidation of these techniques into a systematic theory is due in large measure to Leonhard Euler, whose work in the middle decades of the eighteenth century established the principal exact methods. Euler showed that linear equations with constant coefficients are solved by the substitution $y=e^{rx}$, which reduces the problem to an algebraic equation, and he advanced the theory of series solutions. For equations that admitted no closed-form solution, he introduced the step-by-step numerical procedure, described above as Euler's method, that bears his name. The exact methods presented in this article derive, in large part, from his work.[1]

Leonhard Euler (portrait by Jakob Emanuel Handmann, 1753). Credit: Jakob Emanuel Handmann (public domain).

The theory of partial differential equations arose from the demands of eighteenth-century physics. In 1747, Jean le Rond d'Alembert derived the wave equation for the vibrating string and established that its general solution consists of two waves propagating in opposite directions. The problem of heat conduction proved more demanding, because the initial temperature distribution of a conducting body is arbitrary. In his Théorie analytique de la chaleur (1822), Joseph Fourier derived the heat equation from the physical principles of conduction and solved it by expanding the initial data into a trigonometric series. This work established separation of variables as a standard technique of mathematical physics, and the Fourier series introduced for the purpose has since become fundamental to the analysis of periodic phenomena, from acoustics to signal processing.[2]

The limits of closed-form methods became apparent towards the end of the nineteenth century, and the later history of the subject is concerned principally with equations for which elementary solutions do not exist. In his investigation of the three-body problem of celestial mechanics, Henri Poincaré demonstrated that qualitative properties of the motion, such as its equilibria, stability, and long-term behaviour, can be characterised without solving the equations, thereby founding the qualitative theory of dynamical systems. The subsequent development of electronic computing made numerical approximation, of which Euler's method is the simplest instance, a routine and general technique. The two strands converged in 1963, when Edward Lorenz, studying a simplified system of three ordinary differential equations that models atmospheric convection, established the phenomenon of deterministic chaos: although the equations are deterministic, their solutions are aperiodic and depend so sensitively on initial conditions that long-term weather prediction is not feasible in practice. These later approaches, qualitative analysis, numerical approximation, and series and transform methods, are treated in dedicated articles.[4]

References

  1. ↑ ↑ ↑ Tenenbaum, M. (1985). Ordinary Differential Equations (Book). In Ordinary Differential Equations (Book). Dover Publications.
  2. ↑ ↑ ↑ Strauss, W. A. (2008). Partial Differential Equations: An Introduction (Book). In Partial Differential Equations: An Introduction (Book). John Wiley & Sons.
  3. ↑ Boyce, W. E. (2012). Elementary Differential Equations and Boundary Value Problems (Book). In Elementary Differential Equations and Boundary Value Problems (Book). John Wiley & Sons.
  4. ↑ ↑ Strogatz, S. H. (2015). Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering (Book). In Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering (Book). Westview Press.

Further reading