Suppose I have a system of differential equations like below :

$\dot{x} = x + y + 5$

$\dot{y} = x - y $

Is this system linear or nonlinear differential equations?

  • 2
    Try to write it with a 2x2 matrix. – Tlön Uqbar Orbis Tertius Jul 3 '14 at 8:28
  • but the addition of 5 , in linear algebra terms is non linear right? – dexterdev Jul 3 '14 at 8:32
up vote 2 down vote accepted

The system is linear, yes. It can be written as

$$\begin{bmatrix}\dot{x}\\ \dot{y}\end{bmatrix} = \begin{bmatrix}1 & 1\\ 1 & -1\end{bmatrix}\begin{bmatrix} x\\ y\end{bmatrix} + \begin{bmatrix}5\\ 0\end{bmatrix}$$

  • In linear algebra terms, can we say they are pure linear combinations, a term containing 5 is out there , right? Having a confusion?' – dexterdev Jul 3 '14 at 8:35
  • 2
    I don't really know what that comment means. By definition of a linear differential equation system, what you wrote is a linear differential equation system. – 5xum Jul 3 '14 at 8:37
  • OK I got confused with the shifting operation in linear algebra, in which addition of with a constant is a nonlinear operation as far as I know? Sorry I will have to go through those once again clearly. – dexterdev Jul 3 '14 at 8:40
  • 1
    Yes, the operation $f(x) = Ax + b$ is not a linear mapping (unless $b=0$, of course). But definitions on linear ODEs are that you allow $\dot x = Ax + b$ for some matrix $A$ and vector $b$. – 5xum Jul 3 '14 at 8:41
  • 1
    If the vector $b$ is $0$, then the equation is homogeneous. Yours, for example, is not. – 5xum Jul 3 '14 at 8:42

Strictly speaking, no. It is not linear because superposition does not apply: If we find two different solutions (starting from two different initial conditions) of the above system, the weighted sum of them does not constitute a solution.

Nevertheless, such equations are generally classified as "linear" in math texts, because they can be dealt with by using matrix theory.

  • 1
    when making the distinction you make here it would be good to include the words "homogeneous" and "inhomogeneous" as the homogeneous linear systems are those which you label "linear". – James S. Cook Jul 4 '14 at 14:59
  • 1
    This is an incorrect answer. By the standard definition, a linear systems of differential equations is a system of the type $\dot x = Ax + b$. You are implying that only $\dot x = Ax$ is a linear system, when, by definition, that is a homogeneous system, while $\dot x = Ax + b$ in general is a heterogeneous linear system of ODEs. – 5xum Jul 4 '14 at 23:38
  • I think the answer is correct. Again: Linear systems are systems in which superposition apply. In the above system, strictly speaking, superposition does not apply. But because such systems are very clıse to linear systems, in some textbooks they are classified as linear. – user1992175 Sep 26 at 10:55

You could write your system of equations as$$\begin{pmatrix}\dot{x}\\ \dot{y}\end{pmatrix} = \begin{pmatrix}1 & 1\\ 1 & -1\end{pmatrix}\begin{pmatrix} x\\ y\end{pmatrix} + \begin{pmatrix}5\\ 0\end{pmatrix}$$and solve it this way:

  1. Solve your homogeneous system. In this case, it would be$$\vec{x}_h=\begin{pmatrix} c_1e^t+c_2e^{-t} \\ -2c_2e^{-t} \\ \end{pmatrix}.$$
  2. Solve for your particular solution.

    2.1. Rewrite your system as $\vec{x}(t)'=A\vec{x}(t)+\vec{g}$ where $\vec{g}=\begin{pmatrix}5\\0\\\end{pmatrix}$. Then guess a particular solution. In this case, $\vec{x}_p=\vec{a}.$
    2.2. Take the derivative,$$\vec{x}_p=0,$$and plug things in.$$0=A\vec{a}+\vec{g}$$ $$A\vec{a}=-\vec{g}.$$
    2.3. Solve the system.$$\begin{pmatrix}1&1\\1&-1\\\end{pmatrix}\begin{pmatrix}a_1\\a_2\\\end{pmatrix}=\begin{pmatrix}-5\\0\\\end{pmatrix}$$ $$\begin{cases}a_1+a_2=-5\\a_1-a_2=0\end{cases}$$ $$a_1=-2.5\text{ and }a_2=-2.5$$ $$\vec{a}=\begin{pmatrix}-2.5\\-2.5\\\end{pmatrix}.$$

So, the solution is $$\vec{x}(t)=\begin{pmatrix}c_1e^t+c_2e^{-t}-2.5\\-2c_2e^{-t}-2.5\end{pmatrix}.$$

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.