Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Separation of variables
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Technique for solving differential equations}} {{Differential equations}} In [[mathematics]], '''separation of variables''' (also known as the '''Fourier method''') is any of several methods for solving [[ordinary differential equation|ordinary]] and [[partial differential equation]]s, in which algebra allows one to rewrite an equation so that each of two variables occurs on a different side of the equation. == Ordinary differential equations (ODE) == A differential equation for the unknown <math>f(x)</math> is separable if it can be written in the form :<math>\frac{d}{dx} f(x) = g(x)h(f(x))</math> where <math>g</math> and <math>h</math> are given functions. This is perhaps more transparent when written using <math>y = f(x)</math> as: :<math>\frac{dy}{dx}=g(x)h(y).</math> So now as long as ''h''(''y'') ≠ 0, we can rearrange terms to obtain: :<math>{dy \over h(y)} = g(x) \, dx,</math> where the two variables ''x'' and ''y'' have been separated. Note ''dx'' (and ''dy'') can be viewed, at a simple level, as just a convenient notation, which provides a handy mnemonic aid for assisting with manipulations. A formal definition of ''dx'' as a [[differential (infinitesimal)]] is somewhat advanced. === Alternative notation === Those who dislike [[Leibniz's notation]] may prefer to write this as :<math>\frac{1}{h(y)} \frac{dy}{dx} = g(x),</math> but that fails to make it quite as obvious why this is called "separation of variables". Integrating both sides of the equation with respect to <math>x</math>, we have {{NumBlk|:|<math>\int \frac{1}{h(y)} \frac{dy}{dx} \, dx = \int g(x) \, dx, </math>|{{EquationRef|A1}}}} or equivalently, :<math>\int \frac{1}{h(y)} \, dy = \int g(x) \, dx </math> because of the [[integration by substitution|substitution rule for integrals]]. If one can evaluate the two integrals, one can find a solution to the differential equation. Observe that this process effectively allows us to treat the [[derivative]] <math>\frac{dy}{dx}</math> as a fraction which can be separated. This allows us to solve separable differential equations more conveniently, as demonstrated in the example below. (Note that we do not need to use two [[arbitrary constant of integration|constants of integration]], in equation ({{EquationNote|A1}}) as in :<math>\int \frac{1}{h(y)} \, dy + C_1 = \int g(x) \, dx + C_2,</math> because a single constant <math>C = C_2 - C_1</math> is equivalent.) === Example === Population growth is often modeled by the "logistic" differential equation : <math>\frac{dP}{dt}=kP\left(1-\frac{P}{K}\right)</math> where <math>P</math> is the population with respect to time <math>t</math>, <math>k</math> is the rate of growth, and <math>K</math> is the [[carrying capacity]] of the environment. Separation of variables now leads to : <math> \begin{align} & \int\frac{dP}{P\left(1-P/K \right)}=\int k\,dt \end{align} </math> which is readily integrated using partial fractions on the left side yielding : <math>P(t)=\frac{K}{1+Ae^{-kt}}</math> where A is the constant of integration. We can find <math>A</math> in terms of <math>P\left(0\right)=P_0</math> at t=0. Noting <math>e^0=1</math> we get : <math>A=\frac{K-P_0}{P_0}.</math> === Generalization of separable ODEs to the nth order === Much like one can speak of a separable first-order ODE, one can speak of a separable second-order, third-order or ''n''th-order ODE. Consider the separable first-order ODE: :<math>\frac{dy}{dx}=f(y)g(x)</math> The derivative can alternatively be written the following way to underscore that it is an operator working on the unknown function, ''y'': :<math>\frac{dy}{dx}=\frac{d}{dx}(y)</math> Thus, when one separates variables for first-order equations, one in fact moves the ''dx'' denominator of the operator to the side with the ''x'' variable, and the ''d''(''y'') is left on the side with the ''y'' variable. The second-derivative operator, by analogy, breaks down as follows: :<math>\frac{d^2y}{dx^2} = \frac{d}{dx}\left(\frac{dy}{dx}\right) = \frac{d}{dx}\left(\frac{d}{dx}(y)\right)</math> The third-, fourth- and ''n''th-derivative operators break down in the same way. Thus, much like a first-order separable ODE is reducible to the form :<math>\frac{dy}{dx}=f(y)g(x)</math> a separable second-order ODE is reducible to the form :<math>\frac{d^2y}{dx^2}=f\left(y'\right)g(x)</math> and an nth-order separable ODE is reducible to :<math>\frac{d^ny}{dx^n}=f\!\left(y^{(n-1)}\right)g(x)</math> === Example === Consider the simple nonlinear second-order differential equation:<math display="block">y''=(y')^2.</math>This equation is an equation only of ''y<nowiki>''</nowiki>'' and ''y'<nowiki/>'', meaning it is reducible to the general form described above and is, therefore, separable. Since it is a second-order separable equation, collect all ''x'' variables on one side and all ''y'<nowiki/>'' variables on the other to get:<math display="block">\frac{d(y')}{(y')^2}=dx.</math>Now, integrate the right side with respect to ''x'' and the left with respect to ''y''':<math display="block">\int \frac{d(y')}{(y')^2}=\int dx.</math>This gives<math display="block">-\frac{1}{y'}=x+C_1,</math>which simplifies to:<math display="block">y'=-\frac{1}{x+C_1}~.</math>This is now a simple integral problem that gives the final answer:<math display="block">y=C_2-\ln|x+C_1|.</math> == Partial differential equations{{anchor|pde}} == {{See also|Separable partial differential equation}} The method of separation of variables is also used to solve a wide range of linear partial differential equations with boundary and initial conditions, such as the [[heat equation]], [[wave equation]], [[Laplace equation]], [[Helmholtz equation]] and [[biharmonic equation]]. The analytical method of separation of variables for solving partial differential equations has also been generalized into a computational method of decomposition in invariant structures that can be used to solve systems of partial differential equations.<ref>{{Cite book|url=https://books.google.com/books?id=kxVDDwAAQBAJ|title = Harmonic Wave Systems: Partial Differential Equations of the Helmholtz Decomposition|isbn = 9781618964069|last1 = Miroshnikov|first1 = Victor A.|date = 15 December 2017| publisher=Scientific Research Publishing, Inc. USA }}</ref> === Example: homogeneous case === Consider the one-dimensional [[heat equation]]. The equation is {{NumBlk|:|<math>\frac{\partial u}{\partial t} - \alpha\frac{\partial^{2}u}{\partial x^{2}} = 0</math>|{{EqRef|1}}}} The variable ''u'' denotes temperature. The boundary condition is homogeneous, that is {{NumBlk|:|<math>u\big|_{x=0}=u\big|_{x=L}=0 </math>|{{EqRef|2}}}} Let us attempt to find a [[Triviality_(mathematics)#Trivial_and_nontrivial_solutions|nontrivial solution]] satisfying the boundary conditions but with the following property: ''u'' is a product in which the dependence of ''u'' on ''x'', ''t'' is separated, that is: {{NumBlk|:|<math> u(x,t) = X(x) T(t).</math>|{{EqRef|3}}}} Substituting ''u'' back into equation {{EqNote|1}} and using the [[product rule]], {{NumBlk|:|<math>\frac{T'(t)}{\alpha T(t)} = \frac{X''(x)}{X(x)}= -\lambda,</math>|{{EqRef|4}}}} where ''λ'' must be constant since the right hand side depends only on ''x'' and the left hand side only on ''t''. Thus: {{NumBlk|:|<math>T'(t) = - \lambda \alpha T(t),</math>|{{EqRef|5}}}} and {{NumBlk|:|<math>X''(x) = - \lambda X(x).</math>|{{EqRef|6}}}} −''λ'' here is the [[eigenvalue]] for both differential operators, and ''T''(''t'') and ''X''(''x'') are corresponding [[eigenfunction]]s. We will now show that solutions for ''X''(''x'') for values of ''λ'' ≤ 0 cannot occur: Suppose that ''λ'' < 0. Then there exist real numbers ''B'', ''C'' such that :<math>X(x) = B e^{\sqrt{-\lambda} \, x} + C e^{-\sqrt{-\lambda} \, x}.</math> From {{EqNote|2}} we get {{NumBlk|:|<math>X(0) = 0 = X(L),</math>|{{EqRef|7}}}} and therefore ''B'' = 0 = ''C'' which implies ''u'' is identically 0. Suppose that ''λ'' = 0. Then there exist real numbers ''B'', ''C'' such that :<math>X(x) = Bx + C.</math> From {{EqNote|7}} we conclude in the same manner as in 1 that ''u'' is identically 0. Therefore, it must be the case that ''λ'' > 0. Then there exist real numbers ''A'', ''B'', ''C'' such that :<math>T(t) = A e^{-\lambda \alpha t},</math> and :<math>X(x) = B \sin(\sqrt{\lambda} \, x) + C \cos(\sqrt{\lambda} \, x).</math> From {{EqNote|7}} we get ''C'' = 0 and that for some positive integer ''n'', :<math>\sqrt{\lambda} = n \frac{\pi}{L}.</math> This solves the heat equation in the special case that the dependence of ''u'' has the special form of {{EqNote|3}}. In general, the sum of solutions to {{EqNote|1}} which satisfy the boundary conditions {{EqNote|2}} also satisfies {{EqNote|1}} and {{EqNote|3}}. Hence a complete solution can be given as :<math>u(x,t) = \sum_{n = 1}^{\infty} D_n \sin \frac{n\pi x}{L} \exp\left(-\frac{n^2 \pi^2 \alpha t}{L^2}\right),</math> where ''D''<sub>''n''</sub> are coefficients determined by initial condition. Given the initial condition :<math>u\big|_{t=0}=f(x),</math> we can get :<math>f(x) = \sum_{n = 1}^{\infty} D_n \sin \frac{n\pi x}{L}.</math> This is the [[Fourier sine series]] expansion of ''f''(''x'') which is amenable to [[Fourier analysis]]. Multiplying both sides with <math display="inline">\sin \frac{n\pi x}{L}</math> and integrating over {{closed-closed|0, ''L''}} results in :<math>D_n = \frac{2}{L} \int_0^L f(x) \sin \frac{n\pi x}{L} \, dx.</math> This method requires that the eigenfunctions ''X'', here <math display="inline">\left\{\sin \frac{n\pi x}{L}\right\}_{n=1}^{\infty}</math>, are [[orthogonal]] and [[Schauder basis|complete]]. In general this is guaranteed by [[Sturm–Liouville theory]]. === Example: nonhomogeneous case === Suppose the equation is nonhomogeneous, {{NumBlk|:|<math>\frac{\partial u}{\partial t}-\alpha\frac{\partial^{2}u}{\partial x^{2}}=h(x,t)</math>|{{EqRef|8}}}} with the boundary condition the same as {{EqNote|2}}. Expand ''h''(''x,t''), ''u''(''x'',''t'') and ''f''(''x'') into {{NumBlk|:|<math>h(x,t)=\sum_{n=1}^{\infty}h_{n}(t)\sin\frac{n\pi x}{L},</math>|{{EqRef|9}}}} {{NumBlk|:|<math>u(x,t)=\sum_{n=1}^{\infty}u_{n}(t)\sin\frac{n\pi x}{L},</math>|{{EqRef|10}}}} {{NumBlk|:|<math>f(x)=\sum_{n=1}^{\infty}b_{n}\sin\frac{n\pi x}{L},</math>|{{EqRef|11}}}} where ''h''<sub>''n''</sub>(''t'') and ''b''<sub>''n''</sub> can be calculated by integration, while ''u''<sub>''n''</sub>(''t'') is to be determined. Substitute {{EqNote|9}} and {{EqNote|10}} back to {{EqNote|8}} and considering the orthogonality of sine functions we get : <math>u'_{n}(t)+\alpha\frac{n^{2}\pi^{2}}{L^{2}}u_{n}(t)=h_{n}(t),</math> which are a sequence of [[linear differential equations]] that can be readily solved with, for instance, [[Laplace transform]], or [[Integrating factor]]. Finally, we can get : <math>u_{n}(t)=e^{-\alpha\frac{n^{2}\pi^{2}}{L^{2}} t} \left (b_{n}+\int_{0}^{t}h_{n}(s)e^{\alpha\frac{n^{2}\pi^{2}}{L^{2}} s} \, ds \right).</math> If the boundary condition is nonhomogeneous, then the expansion of {{EqNote|9}} and {{EqNote|10}} is no longer valid. One has to find a function ''v'' that satisfies the boundary condition only, and subtract it from ''u''. The function ''u-v'' then satisfies homogeneous boundary condition, and can be solved with the above method. === Example: mixed derivatives === For some equations involving mixed derivatives, the equation does not separate as easily as the heat equation did in the first example above, but nonetheless separation of variables may still be applied. Consider the two-dimensional [[biharmonic equation]] :<math>\frac{\partial^4 u}{\partial x^4} + 2\frac{\partial^4 u}{\partial x^2\partial y^2} + \frac{\partial^4 u}{\partial y^4} = 0.</math> Proceeding in the usual manner, we look for solutions of the form :<math>u(x,y) = X(x)Y(y)</math> and we obtain the equation :<math>\frac{X^{(4)}(x)}{X(x)} + 2\frac{X''(x)}{X(x)}\frac{Y''(y)}{Y(y)} + \frac{Y^{(4)}(y)}{Y(y)} = 0.</math> Writing this equation in the form :<math>E(x) + F(x)G(y) + H(y) = 0,</math> Taking the derivative of this expression with respect to <math> x </math> gives <math> E'(x)+F'(x)G(y)=0 </math> which means <math> G(y)=const. </math> or <math> F'(x)=0 </math> and likewise, taking derivative with respect to <math> y </math> leads to <math> F(x)G'(y)+H'(y)=0 </math> and thus <math> F(x)=const. </math> or <math> G'(y)=0 </math>, hence either ''F''(''x'') or ''G''(''y'') must be a constant, say −λ. This further implies that either <math>-E(x)=F(x)G(y)+H(y)</math> or <math>-H(y)=E(x)+F(x)G(y)</math> are constant. Returning to the equation for ''X'' and ''Y'', we have two cases :<math>\begin{align} X''(x) &= -\lambda_1X(x) \\ X^{(4)}(x) &= \mu_1X(x) \\ Y^{(4)}(y) - 2\lambda_1Y''(y) &= -\mu_1Y(y) \end{align}</math> and :<math>\begin{align} Y''(y) &= -\lambda_2Y(y) \\ Y^{(4)}(y) &= \mu_2Y(y) \\ X^{(4)}(x) - 2\lambda_2X''(x) &= -\mu_2X(x) \end{align}</math> which can each be solved by considering the separate cases for <math>\lambda_i<0, \lambda_i=0, \lambda_i>0</math> and noting that <math>\mu_i=\lambda_i^2</math>. === Curvilinear coordinates === In [[orthogonal curvilinear coordinates]], separation of variables can still be used, but in some details different from that in Cartesian coordinates. For instance, regularity or periodic condition may determine the eigenvalues in place of boundary conditions. See [[spherical harmonics#Laplace's spherical harmonics|spherical harmonics]] for example. == Applicability == ===Partial differential equations=== For many PDEs, such as the wave equation, Helmholtz equation and Schrödinger equation, the applicability of separation of variables is a result of the [[spectral theorem]]. In some cases, separation of variables may not be possible. Separation of variables may be possible in some coordinate systems but not others,<ref name="MathWorld">''John Renze, Eric W. Weisstein'', Separation of variables</ref> and which coordinate systems allow for separation depends on the symmetry properties of the equation.<ref name="Miller1984">Willard Miller(1984) ''Symmetry and Separation of Variables'', Cambridge University Press</ref> Below is an outline of an argument demonstrating the applicability of the method to certain linear equations, although the precise method may differ in individual cases (for instance in the biharmonic equation above). Consider an initial boundary value problem for a function <math> u(x,t) </math> on <math> D = \{(x,t): x \in [0,l], t \geq 0 \}</math> in two variables: :<math> (Tu)(x,t) = (Su)(x,t) </math> where <math>T</math> is a differential operator with respect to <math>x</math> and <math>S</math> is a differential operator with respect to <math>t</math> with boundary data: :<math>(Tu)(0,t) = (Tu)(l,t) = 0</math> for <math> t \geq 0</math> :<math>(Su)(x,0)=h(x) </math> for <math> 0 \leq x \leq l</math> where <math>h</math> is a known function. We look for solutions of the form <math>u(x,t) = f(x) g(t)</math>. Dividing the PDE through by <math>f(x)g(t)</math> gives :<math> \frac{Tf}{f} = \frac{Sg}{g} </math> The right hand side depends only on <math>x</math> and the left hand side only on <math> t</math> so both must be equal to a constant <math> K </math>, which gives two ordinary differential equations :<math>Tf = Kf, Sg = Kg</math> which we can recognize as eigenvalue problems for the operators for <math>T</math> and <math>S</math>. If <math>T</math> is a compact, self-adjoint operator on the space <math>L^2[0,l]</math> along with the relevant boundary conditions, then by the Spectral theorem there exists a basis for <math>L^2[0,l]</math> consisting of eigenfunctions for <math>T</math>. Let the spectrum of <math>T</math> be <math>E</math> and let <math>f_{\lambda}</math> be an eigenfunction with eigenvalue <math>\lambda \in E</math>. Then for any function which at each time <math>t</math> is square-integrable with respect to <math>x</math>, we can write this function as a linear combination of the <math>f_{\lambda}</math>. In particular, we know the solution <math>u</math> can be written as :<math>u(x,t) = \sum_{\lambda \in E} c_{\lambda}(t)f_{\lambda}(x)</math> For some functions <math>c_{\lambda}(t)</math>. In the separation of variables, these functions are given by solutions to <math> Sg = Kg </math> Hence, the spectral theorem ensures that the separation of variables will (when it is possible) find all the solutions. For many differential operators, such as <math>\frac{d^2}{dx^2}</math>, we can show that they are self-adjoint by integration by parts. While these operators may not be compact, their inverses (when they exist) may be, as in the case of the wave equation, and these inverses have the same eigenfunctions and eigenvalues as the original operator (with the possible exception of zero).<ref name="Benson2007">David Benson (2007) ''Music: A Mathematical Offering'', Cambridge University Press, Appendix W</ref> == Matrices == The matrix form of the separation of variables is the [[Kronecker sum]]. As an example we consider the 2D [[Discrete Laplace operator|discrete Laplacian]] on a [[regular grid]]: :<math>L = \mathbf{D_{xx}}\oplus\mathbf{D_{yy}}=\mathbf{D_{xx}}\otimes\mathbf{I}+\mathbf{I}\otimes\mathbf{D_{yy}}, \,</math> where <math>\mathbf{D_{xx}} </math> and <math>\mathbf{D_{yy}} </math> are 1D discrete Laplacians in the ''x''- and ''y''-directions, correspondingly, and <math>\mathbf{I} </math> are the identities of appropriate sizes. See the main article [[Kronecker sum of discrete Laplacians]] for details. == Software and AI == Some mathematical [[Software|programs]] are able to do separation of variables: [[Xcas]]<ref>{{Cite web|url=http://www-fourier.ujf-grenoble.fr/~parisse/giac/cascmd_en.pdf|title=Symbolic algebra and Mathematics with Xcas}}</ref> among others. [[Microsoft Copilot]] and [[ChatGPT]] can do separation of variables. ==See also== *[[Inseparable differential equation]] == Notes == {{Reflist}} == References == *{{Cite book | first1 = Andrei D. | last1 = Polyanin | title = Handbook of Linear Partial Differential Equations for Engineers and Scientists | publisher = [[CRC Press|Chapman & Hall/CRC]] | date = 2001-11-28 | location = Boca Raton, FL | isbn = 1-58488-299-9 }} *{{Cite book | first1 = Tyn | last1 = Myint-U | first2 = Lokenath | last2 = Debnath |author-link2=Lokenath Debnath | isbn = 978-0-8176-4393-5 | title = Linear Partial Differential Equations for Scientists and Engineers | location = Boston, MA | year = 2007 | publisher = [[Birkhäuser|Birkhäuser Boston]] | doi = 10.1007/978-0-8176-4560-1 }} * {{Cite book | last = Teschl | first = Gerald | author-link = Gerald Teschl | title = Ordinary Differential Equations and Dynamical Systems | series = [[Graduate Studies in Mathematics]] | volume = 140 | publisher = [[American Mathematical Society]] | location = Providence, RI | year = 2012 | isbn = 978-0-8218-8328-0 | url = https://www.mat.univie.ac.at/~gerald/ftp/book-ode/ }} == External links == * {{springer|title=Fourier method|id=p/f041070}} * {{mathworld2 |urlname=SeparationofVariables |title=Separation of variables|urlname2=DifferentialEquation|title2=Differential Equation|author=John Renze, [[Eric W. Weisstein]]}} * [http://eqworld.ipmnet.ru/en/education/edu-pde.htm Methods of Generalized and Functional Separation of Variables] at EqWorld: The World of Mathematical Equations * [https://web.archive.org/web/20100125064547/http://www.exampleproblems.com/wiki/index.php/PDE:Integration_and_Separation_of_Variables Examples] of separating variables to solve PDEs * [http://www.math-cs.gordon.edu/courses/mat225/handouts/sepvar.pdf "A Short Justification of Separation of Variables"] [[Category:Ordinary differential equations]] [[Category:Partial differential equations]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Anchor
(
edit
)
Template:Cite book
(
edit
)
Template:Cite web
(
edit
)
Template:Closed-closed
(
edit
)
Template:Differential equations
(
edit
)
Template:EqNote
(
edit
)
Template:EqRef
(
edit
)
Template:EquationNote
(
edit
)
Template:Mathworld2
(
edit
)
Template:NumBlk
(
edit
)
Template:Reflist
(
edit
)
Template:See also
(
edit
)
Template:Short description
(
edit
)
Template:Springer
(
edit
)