• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Collection of formulas
  • Basic engineering mathematics
    • Partial fractions
    • Differentiation
    • Differentiation applications
    • Integration
    • Complex numbers
    • Series
    • Vector
    • Sequences
  • Advanced engineering mathematics
    • First order ODE
    • Second order ODE
    • Partial differentiation
    • Vector analysis
    • Determinants
    • Matrix analysis
    • Laplace transform
    • Difference equations and z-transform
    • Partial differential equations
    • Multiple integration

Engineering math blog

  • Bloglovin
  • Facebook
  • LinkedIn
  • Pinterest
  • Tumblr
  • Twitter

December 16, 2016 By Dr. Aspriha Peters 1 Comment

Separation of variables in ODE

Separation of variables in ODE. Dear friends, today I will talk about the separation of variables in ordinary differential equations. This is one of the methods of solving first order ODE.

Separation of variables

First order ODE by separation of variables

As the name says, in this method, the variables are separated first.

Then both sides are integrated to get the solution to the equation.

Here I will show you two examples of ‘separation of variables’ method. Have a look!!

If interested, you can also check out more posts in first order ODE such as

  • First-order homogeneous ODE
  • Solve First-order ODE using transformations
  • First-order linear ODE
  • Bernoulli’s equations

Examples of separation of variables


Note: None of these examples are mine. I have chosen these from some book or books. I have also given the due reference at the end of the post.

So here is the first example.


Example 1

According to Stroud and Booth (2013)* “Find the general solution of (1+x^2)\cfrac{dy}{dx}=x(1+y^2). ”

Solution

Here the given equation is

    \[(1+x^2)\frac{dy}{dx}=x(1+y^2).\]

This equation does not have any term like m \pm (xy)^n. Here m, n can be real number except zero.

This means in this example it will be possible to separate x and y variables.

In case if it would have any term like (1+xy)  or (1-xy), then the ‘separation of variables’ method would not work.

Step 1

I will now try to separate x and y components of this equation.

For this, I will divide the equation with (1+x^2)(1+y^2) to get

    \begin{eqnarray*} (1+x^2)\frac{dy}{dx}&=&x(1+y^2)\\ \frac{(1+x^2)}{(1+x^2)(1+y^2)}\frac{dy}{dx}&=&\frac{x(1+y^2)}{(1+x^2)(1+y^2)}\\ \frac{1}{1+y^2}\frac{dy}{dx}&=&\frac{x}{1+x^2}~~~(1+x^2) \neq 0, (1+y^2) \neq 0\\ \frac{1}{1+y^2} dy &=& \frac{x}{1+x^2} dx. \end{eqnarray*}

Now I will integrate both sides to the solution of the given equation.

Step 2

Thus the equation will look like

(1)   \begin{equation*} \int\frac{1}{1+y^2} dy =\int \frac{x}{1+x^2} dx. \end{equation*}

From the standard formula of integration, I already know that

    \[\int \frac{1}{1+x^2}= \tan^{-1}x.\]

Thus the left hand side of the equation (1) will be

(2)   \begin{equation*} \int\frac{1}{1+y^2} dy = \tan^{-1}y. \end{equation*}

Now I will work on the right hand side of the equation.

Suppose

    \[I =\int \frac{x}{1+x^2} dx.\]

From the standard rule of differentiation, I already know that if t = 1+x^2, \cfrac{dt}{dx} = 2x.

In other words, I can also say that x dx = \cfrac{1}{2}dt.

Thus I can rewrite I as

    \[I = \int \frac{1}{2}\frac{1}{t} dt.\]

Now I will try to get the value of I. Therefore

    \begin{eqnarray*} I&=& \int \frac{1}{2}\frac{1}{t} dt\\ &=&\frac{1}{2}\int \frac{1}{t} dt\\ &=&\frac{1}{2} \ln t + C. \end{eqnarray*}

Here C is the integration constant.

Now I substitute back t = 1+x^2 in I to get

(3)   \begin{equation*} I = \frac{1}{2} \ln |1+x^2| + C. \end{equation*}

At the end, I will put the values of equations (2) and (3) in equation (1). So it becomes

    \begin{eqnarray*} \tan^{-1}y &=&\frac{1}{2} \ln |1+x^2| + C\\2\tan^{-1}y &=&\ln |1+x^2| + 2C\\2\tan^{-1}y &=&\ln |1+x^2| + A ~(A = 2C). \end{eqnarray*}

So the conclusion is 2\tan^{-1}y &=&\ln |1+x^2| + A is the solution of the equation.

Now I will go to the second example.


Example 2

According to Stroud and Booth (2013)* “Solve \cfrac{dy}{dx}+x+xy^2 = 0, given y = 0 when x = 1.”

Solution

Here the given differential equation is:

    \[\frac{dy}{dx}+x+xy^2 = 0.\]

Like my first example, here also I will separate x and y components.

Step 1

First of all, I will rewrite the equation as

    \begin{eqnarray*} \frac{dy}{dx}+x+xy^2 &=& 0\\ \frac{dy}{dx} &=& -(x+xy^2)\\ \frac{dy}{dx} &=& -x(1+y^2). \end{eqnarray*}

Now I will divide the equation through out with (1+y^2) to get

    \begin{eqnarray*} \frac{dy}{dx} &=& -x(1+y^2)\\ \frac{1}{1+y^2}\frac{dy}{dx} &=& \frac{-x(1+y^2)}{1+y^2}\\ \frac{1}{1+y^2}\frac{dy}{dx} &=& -x~ (1+y^2) \neq 0 \\ \frac{1}{1+y^2} dy &=& - x dx. \end{eqnarray*}

Next I will integrate both sides of the equation to get the solution.

Step 2

Thus the equation will look like

(4)   \begin{equation*} \int \frac{1}{1+y^2} dy = \int - x dx. \end{equation*}

From the standard formula of integration, I already know that

    \[\int \frac{1}{1+x^2}= \tan^{-1}x.\]

Thus the left hand side of the equation (4) will be

(5)   \begin{equation*} \int\frac{1}{1+y^2} dy = \tan^{-1}y. \end{equation*}

For the right hand side of the equation (4), I already know that from the standard formula of integration. Thus it will be

(6)   \begin{equation*} \int - x dx = - \frac{x^2}{2}+C. \end{equation*}

Now I will put the values from (5) and (6) to (4) to get the solution of the given differential equation as

(7)   \begin{equation*} \tan^{-1}y = - \frac{x^2}{2}+C. \end{equation*}

Well, this is the general solution of the equation.

Next I have to get the particular solution of the equation for y = 0, x = 1.

Step 3

Now I put y = 0 and x = 1 in the equation (7) to get

    \begin{eqnarray*} \tan^{-1}(0) &=& - \frac{1^2}{2}+C\\ 2\tan^{-1}(0) &=& - 1 + 2C\\ 2 (0) &=& -1+2C\\ 2C&=&1\\C &=&\frac{1}{2}. \end{eqnarray*}

Next I substitute this value of C= \cfrac{1}{2} in the equation (7) to get the particular solution of the given equation as

    \begin{eqnarray*} \tan^{-1}y &=& - \frac{x^2}{2}+\frac{1}{2}\\ 2\tan^{-1}y &=& - x^2+1\\ 2\tan^{-1}y &=&1 - x^2. \end{eqnarray*}

Finally I can say that 2\tan^{-1}y = 1 - x^2 is the solution of the given equation for y = 0, x = 1.


Dear friends, this is the end of my today’s post. Thank you very much for reading this. Please let me know how you feel about it. Soon I will be back again with a new post. Till then, bye, bye!!

*Reference: K. A. Stroud and Dexter J. Booth (2013): Engineering mathematics, Industrial Press, Inc. ; 7th Edition (March 8, 2013), Chapter: First-order Differential Equations, Further problems 25, p. 1000, Q. No.s 33 (Example 1), 43 (Example 2).

Filed Under: Advanced engineering mathematics, First order ODE Tagged With: First order ordinary differential equations, Separation of variables

About Dr. Aspriha Peters

Trained mathematician & hobby academic. Curious about nature as well as an aspiring blogger.

Copyright

All rights reserved© ‘Engineering mathematics blog’ and ‘engineeringmathgeek.com’, 2016-19. All written materials and photos published on this blog is copyright protected. Excerpts and links may be used, provided that full and clear credit is given to ‘Aspriha Peters’ and “Engineering mathematics blog” with appropriate and specific direction to the original content.

Reader Interactions

Leave a Reply Cancel reply

Your e-mail address will not be published. Required fields are marked *

Primary Sidebar

COPYRIGHT

All rights reserved© ‘Engineering mathematics blog’ and ‘engineeringmathgeek.com’, 2016-19. All written materials and photos published on this blog is copyright protected.

Excerpts and links may be used, provided that full and clear credit is given to ‘Aspriha Peters’ and “Engineering mathematics blog” with appropriate and specific direction to the original content.

Please contact engineeringmathgeek (at) gmail dot com for permissions or questions or queries, if any.

Thank you very much for visiting this blog. All relevant suggestions and comments are extremely welcome.

Mathematician & hobby academic. Curious about nature. Aspiring blogger & avid reader. More about me.

Recent posts

  • Describe graphs in Fourier series February 20, 2019
  • Complex conjugate numbers – what is it? February 18, 2019
  • Roots of a complex number – how to find out? February 15, 2019
  • Integrate exact differentials – but how? February 13, 2019
  • Multiplication and division of complex numbers February 11, 2019
  • Gauss-Jordan method to find out the inverse of a matrix February 9, 2019
  • Symmetric skew-symmetric and orthogonal matrices – how to find these? February 6, 2019
  • Addition and subtraction of complex numbers February 4, 2019
  • Functions of complex variables January 29, 2019
  • Gaussian elimination method in 3 × 3 matrices January 28, 2019

Advanced engineering mathematics

  • First order ODE
  • Second order ODE
  • Partial differentiation
  • Determinants
  • Laplace transform
  • Matrix analysis
  • Vector analysis
  • Difference equations and z-transform
  • Partial differential equations
  • Multiple integration

Basic engineering mathematics

  • Partial fractions
  • Differentiation
  • Differentiation applications
  • Integration
  • Complex numbers
  • Vector
  • Series
  • Sequences

Footer

Mathematician & hobby academic. Curious about nature. Aspiring blogger & avid reader. More about me.

  • About
  • Overview
  • Privacy policy

engineeringmathgeek.com © 2019- All rights reserved .

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy policy