|
|
General Solution of Differential Equation

Generally speaking, you might prefer chocolate ice cream to strawberry ice cream.  In particular, you might like mint chocolate chip ice cream.  When you are talking about solutions to differential equations, you think about general solutions and particular solutions as well. By the end of this article, you might even be particularly fond of general solutions!

Mockup Schule

Explore our app and discover over 50 million learning materials for free.

General Solution of Differential Equation

Illustration

Lerne mit deinen Freunden und bleibe auf dem richtigen Kurs mit deinen persönlichen Lernstatistiken

Jetzt kostenlos anmelden

Nie wieder prokastinieren mit unseren Lernerinnerungen.

Jetzt kostenlos anmelden
Illustration

Generally speaking, you might prefer chocolate ice cream to strawberry ice cream. In particular, you might like mint chocolate chip ice cream. When you are talking about solutions to differential equations, you think about general solutions and particular solutions as well. By the end of this article, you might even be particularly fond of general solutions!

General Solutions to Differential Equations a bowl of ice cream StudySmarterFig. 1 - In general, do you prefer ice cream over math?

General Solutions to Ordinary Differential Equations

So what is a general solution to the differential equation anyway?

The general solution to a differential equation is a solution in its most general form. In other words, it does not take any initial conditions into account.

Often you will see a general solution written with a constant in it. The general solution is called a family of functions.

Any one of the functions that make up the general solution will solve the differential equation!

Let's take a look at an example so you can see why.

Show that the function

\[y(x) = \frac{C}{x^2} + \frac{3}{4}\]

is a solution of

\[2xy' = 3-4y\]

for any value of \(C\) which is a real number.

Solution:

First differentiating the function \(y(x)\) you get

\[ y'(x) = -\frac{2C}{x^3}.\]

Then substituting it into the left side of the equation,

\[ \begin{align} 2xy' &= 2x\left(-\frac{2C}{x^3} \right) \\ &= -\frac{4C}{x^2}. \end{align}\]

Substituting into the right side of the equation gives you

\[ \begin{align} 3-4y &= 3-4\left( \frac{C}{x^2} + \frac{3}{4} \right) \\ &= 3-\frac{4C}{x^2} - 3 \\ &=-\frac{4C}{x^2} .\end{align}\]

Since you get the same thing on the left and right sides when you substitute in \(y(x)\), it is a solution to the equation. In fact, this is true for any real number \(C\).

If you graph the solution for some values of \(C\) you can see why the general solution is often called a family of functions. The general solution defines an entire group of functions that are all very similar! All of the functions in the graph below have the same vertical asymptote, the same shape, and the same long-term behavior.

General Solutions to Differential Equations graph showing four of the functions in the family of solutions StudySmarterFig. 2 - The general solution is a family of functions. Here you see four different values of \(C\) producing very similar looking curves.

General Solutions to Homogeneous Differential Equations

So, does it make a difference if your differential equation is homogeneous when you find the general solution? Not a bit! The general solution is still defined exactly the same way. Let's look at an example.

What is the general solution to the homogeneous differential equation \(xy' = -2y \) ?

Solution:

This is a separable differential equation. It can be rewritten as

\[\frac{1}{y}y' = -\frac{2}{x}.\]

You can use an integrating factor to solve this, and for a reminder on how to do so see the article Solutions to Differential Equations. When you solve it you get

\[ y(x) = \frac{C}{x^2}.\]

Since the solution depends on a constant, it is a general solution. In fact, you could write it as

\[ y_C(x) = \frac{C}{x^2}.\]

to remind yourself that the general solution depends on that constant as well as on \(x\).

Notice that in the previous example the general solution is actually part of the general solution to the very first example where you were looking at the differential equation \(2xy' = 3-4y \). Why is that?

It turns out that the homogeneous differential equation \(xy' = -2y \) can be rewritten as \(2xy' = -4y \), so you can think of them as a nonhomogeneous differential equation and a corresponding homogeneous equation:

Keep reading to figure out why that matters!

General Solutions to Nonhomogeneous Differential Equations

As you have just seen, nonhomogeneous differential equations have a corresponding homogeneous differential equation. So how do their solutions relate to each other?

Think of the general solution to the nonhomogeneous differential equation \(2xy' = 3-4y \). You know it is

\[y_s(x) = \frac{C}{x^2} + \frac{3}{4},\]

where you can think of the subscript \(s\) as standing for "solution". Let's think of this solution as having two parts, one which depends on the constant \(C\), and one which does not. So for \(y_s(x)\),

\[ y_C(x) = \frac{C}{x^2} \text{ and } y_p(x) = \frac{3}{4} .\]

Then

\[y_s(x) = y_C(x) + y_p(x).\]

Show that \(y_p(x) = \dfrac{3}{4} \) solves the nonhomogeneous differential equation \(2xy' = 3-4y \).

Solution:

Notice that \(y'_p(x) = 0 \), so substituting this into the left side of the equation gives you

\[ 2xy_p' = 2x(0) = 0.\]

Substituting it into the right side of the equation,

\[ 3-4y_p = 3-4\left(\frac{3}{4}\right) = 0.\]

Since you get the same thing on both sides, \(y_p(x)\) is a solution to the nonhomogeneous differential equation.

Notice that if you let \(C=0\) you get \(y_s(x) = y_p(x)\). That means \(y_p(x)\) is one of the family of functions that makes up the general solution to the nonhomogeneous differential equation. In other words, it is one particular solution (which is why it is \(y_p\)), and that particular solution does solve the nonhomogeneous differential equation.

What about \(y_C(x)\)? Does it solve the differential equation?

Does \(y_C(x) = \dfrac{C}{x^2} \) solve the nonhomogeneous differential equation \(2xy' = 3-4y \)?

Solution:

Start by taking the derivative:

\[y'_C(x) = -\frac{2C}{x^3}.\]

Then substituting it into the differential equation on the left-hand side, you get

\[ \begin{align} 2xy_C' &= 2x\left( -\frac{2C}{x^3} \right) \\ &= -\frac{4C}{x^2} ,\end{align}\]

and on the right-hand side, you get

\[\begin{align} 3-4y_C &= 3-4\left(\frac{C}{x^2} \right) \\ &= 3-\frac{4C}{x^2} .\end{align}\]

These are definitely not the same, so \(y_C(x)\) does not solve the nonhomogeneous differential equation.

Well if \(y_C(x)\) doesn't solve the nonhomogeneous differential equation, what does it solve?

Show that \(y_C(x) = \dfrac{C}{x^2} \) solves the corresponding homogeneous differential equation \(2xy' = -4y \).

Solution:

As before,

\[y'_C(x) = -\frac{2C}{x^3},\]

and substituting this into the left side of the equation still gives you

\[ 2xy_C' = -\frac{4C}{x^2} .\]

However, substituting \(y_C(x)\) into the right side of the equation now gives you

\[ -4y_C = -\frac{4C}{x^2} ,\]

as well, so \(y_C(x)\) solves the corresponding homogeneous differential equation.

It turns out that you can write the general solution to a nonhomogeneous differential equation as the sum of a particular solution to the nonhomogeneous differential equation and the general solution to the corresponding homogeneous differential equation!

This is important because it is often easier to find a general solution to a homogeneous problem than a nonhomogeneous one, and then you are just left to find one solution to the nonhomogeneous one. If you are lucky it will turn out that the particular solution is a constant as in the example above.

General Solutions to First Order Differential Equations

The articles Solutions to Differential Equations and Linear Differential Equations have lots of information and examples on how to solve first-order differential equations. In fact, the examples above have been first order, but the concepts of general and particular solutions apply to higher-order equations as well.

In fact, if you are interested in solving first-order equations which are nonlinear you can take a look at the article Non-homogeneous Linear Equations.

Examples of General Solution to Differential Equations

Let's take a look at more examples of general solutions to differential equations.

Which of the following is a general solution to the nonhomogeneous differential equation

\[y' = y+\sin x?\]

(a) \(y(x) = Ce^x\)

(b) \(y(x) = \sin x + \cos x\)

(c) \(y(x) = Ce^x -\dfrac{1}{2}(\sin x + \cos x )\).

Solution:

To figure this out, you can either solve the nonhomogeneous differential equation, or you can try plugging each one in. As you practice more you will get used to looking at an equation and having a general idea of what the solution will be. Let's look at each one of the potential solutions in turn.

(a) From experience working with linear differential equations you already know that \(y(x) = Ce^x\) is the solution to the homogeneous differential equation \(y'=y\). This is the general solution to the corresponding homogeneous differential equation of the nonhomogeneous differential equation. In other words, this would be \(y_C(x)\), and you have already seen that \(y_C(x)\) does not solve the nonhomogeneous differential equation.

(b) This potential solution looks more promising since it has trigonometric functions in it. If you plug it into the right-hand side of the nonhomogeneous differential equation you get

\[ \begin{align} y+\sin x &= \sin x + \cos x + \sin x \\ &= 2\sin x + \cos x. \end{align}\]

Taking the derivative you get

\[y'(x) = \cos x -\sin x.\]

Not quite the same, so this function is not the general solution to the nonhomogeneous differential equation.

(c) This potential solution has both the solution to the corresponding homogeneous differential equation and trigonometric functions. It might work! Taking the derivative you get

\[y'(x) = Ce^x -\frac{1}{2}(\cos x - \sin x).\]

Plugging it into the right-hand side of the equation you get

\[ \begin{align} y+\sin x &= Ce^x -\frac{1}{2}(\sin x + \cos x ) + \sin x \\ &= Ce^x +\frac{1}{2}\sin x -\frac{1}{2} \cos x \\ &= Ce^x -\frac{1}{2}(\cos x - \sin x) .\end{align}\]

Since you get the same thing on both sides, this function is a general solution to the nonhomogeneous differential equation.

In the previous example you saw that \(y(x) = Ce^x -\dfrac{1}{2}(\sin x + \cos x )\) is a general solution to the nonhomogeneous differential equation \(y' = y+\sin x \), and that \(y_C(x) = Ce^x \) is a general solution to the corresponding nonhomogeneous differential equation. What can you conclude about the function

\[y(x) = -\frac{1}{2}(\cos x - \sin x) ?\]

Since you can write the general solution to a nonhomogeneous differential equation as \(y_C(x) + y_p(x)\), that implies that

\[y_p(x) = -\frac{1}{2}(\cos x - \sin x) \]

is a particular solution to the nonhomogeneous differential equation!

General Solution of Differential Equation - Key takeaways

  • The general solution to a differential equation is a solution in its most general form. In other words, it does not take any initial conditions into account.
  • Nonhomogeneous differential equations have corresponding homogeneous differential equations.
  • You can write the general solution to a nonhomogeneous differential equation as the sum of a particular solution to the nonhomogeneous differential equation and the general solution to the corresponding homogeneous differential equation.

Frequently Asked Questions about General Solution of Differential Equation

It depends on the differential equation.  The general solution does not take into account any initial conditions, and the solution technique to find it depends on the order and type of differential equation.

Ignore any initial conditions given.  The general solution solves the differential equation and usually has a constant of integration still in it.

It depends on the differential equation.  You might use variation of parameters or an integrating factor (or one of many other techniques). The general solution does not take into account any initial conditions given.  Instead it will have a constant of integration.

Differential equations are used to describe systems that vary over time.  They can be used to describe radio waves, mixing solutions for life-saving drugs, or to describe population interactions.

Many places!  In fact, if your doctor has prescribed any drugs for you to take, differential equations are one of the tools used to figure out how to properly mix compounds together for them.

Test your knowledge with multiple choice flashcards

True or False: The general solution to a differential equation needs to satisfy initial conditions.

True or False:  Nonhomogeneous differential equations have a corresponding homogeneous differential equation associated with them.

If you look at the general solution \(y_C(x)\) to a differential equation, what sorts of properties will the functions share if you substitute in various values of \(C\)?

Next
More about General Solution of Differential Equation

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App Join over 22 million students in learning with our StudySmarter App

Sign up to highlight and take notes. It’s 100% free.

Entdecke Lernmaterial in der StudySmarter-App

Google Popup

Join over 22 million students in learning with our StudySmarter App

Join over 22 million students in learning with our StudySmarter App

The first learning app that truly has everything you need to ace your exams in one place

  • Flashcards & Quizzes
  • AI Study Assistant
  • Study Planner
  • Mock-Exams
  • Smart Note-Taking
Join over 22 million students in learning with our StudySmarter App