First-order linear differential equation: Difference between revisions

From Calculus
(Created page with "==Definition== ===Format of the differential equation=== A '''first-order linear differential equation''' is a differential equation of the form: <math>\frac{dy}{dx} + p(x)...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 22: Line 22:


{{quotation|<math>y = e^{-H(x)}\int q(x)e^{H(x)} \, dx</math> where <math>H</math> is an antiderivative of <math>p</math>.}}
{{quotation|<math>y = e^{-H(x)}\int q(x)e^{H(x)} \, dx</math> where <math>H</math> is an antiderivative of <math>p</math>.}}
In particular, we obtain that:
<math>\mbox{General solution} = \mbox{Particular solution} + Ce^{-H(x)}, C \in \R</math>


The function <math>e^{H(x)}</math> is termed the [[integrating factor]] for the differential equation because multiplying by this turns the differential equation into an exact differential equation, i.e., a differential equation to which we can apply integration on both sides.
The function <math>e^{H(x)}</math> is termed the [[integrating factor]] for the differential equation because multiplying by this turns the differential equation into an exact differential equation, i.e., a differential equation to which we can apply integration on both sides.
===Solution method and formula: definite integral version===
Suppose we are given the initial value condition that at <math>x = x_0, y = y_0</math>.
Let <math>H(x)</math> be an [[antiderivative]] for <math>p(x)</math>, so that <math>H'(x) = p(x)</math>. Then, we multiply both sides by <math>e^{H(x)}</math>. Simplifying, we get:
<math>\frac{d}{dx}[e^{H(x)}y] = q(x)e^{H(x)}</math>
Integrating from <math>x_0</math> to (arbitrary) <math>x</math>, we get:
<math>e^{H(x)}y - e^{H(x_0)}y_0= \int_{x_0}^x q(t)e^{H(t)} \, dt</math>
Thus, the general expression is:
<math>y = e^{-H(x)}\left(e^{H(x_0)}y_0 + \int_{x_0}^x q(t)e^{H(t)} \, dt\right)</math>
==Examples==
===Simple example===
Consider the differential equation:
<math>y' + y = e^{e^x}</math>
Here, <math>p(x) = 1, q(x) = e^{e^x}</math>. Take <math>H(x) =x</math> and get:
<math>y = e^{-x} \int e^{e^x}e^x \, dx</math>
This gives:
<math>y = e^{-x}(e^{e^x} + C), \qquad C \in \R</math>
===Example that is better solved by subtitution===
Consider:
<math>xy' + y = \sin x</math>
Divide both sides by <math>x</math> to get:
<math>y' + \frac{y}{x} = \frac{\sin x}{x}</math>
This is linear, with <math>p(x) = 1/x</math>, <math>q(x) = (\sin x)/x</math>. Take <math>H(x) = \ln x</math> and <math>e^{H(x)} = x</math> (see note):
<math>y = \frac{1}{x} \int \frac{\sin x}{x} x \, dx</math>
This gives:
<math>y = \frac{C - \cos x}{x}, \qquad C \in \R</math>
The linear method is unnecessary -- we divided and multiplied by <math>x</math>. A better solution would be to substitute <math>u = xy</math> and get a [[separable differential equation]].
===Example where a particular solution is obtained by inspection===
Consider:
<math>y' + y = \tan x + \tan^2x</math>
The linear method gives:
<math>y = e^{-x} \int e^x(\tan x + \tan^2x) \, dx</math>
The integration is not easy. So, instead of trying to do the integration directly, we note that the answer is:
<math>y = \mbox{Particular solution} + Ce^{-x}</math>
It thus suffices to find a particular solution. Inspection and guesswork gives a solution <math>y = \tan x - 1</math>. The general solution is thus:
<math>y = \tan x - 1 + Ce^{-x}</math>

Latest revision as of 23:42, 5 July 2012

Definition

Format of the differential equation

A first-order linear differential equation is a differential equation of the form:

dydx+p(x)y=q(x)

where p,q are known functions.

Solution method and formula: indefinite integral version

Let H(x) be an antiderivative for p(x), so that H(x)=p(x). Then, we multiply both sides by eH(x). Simplifying, we get:

ddx[eH(x)y]=q(x)eH(x)

Integrating, we get:

eH(x)y=q(x)eH(x)dx

Rearranging, we get:

y=eH(x)q(x)eH(x)dx

where

H

is an antiderivative of

p

.

In particular, we obtain that:

General solution=Particular solution+CeH(x),CR

The function eH(x) is termed the integrating factor for the differential equation because multiplying by this turns the differential equation into an exact differential equation, i.e., a differential equation to which we can apply integration on both sides.

Solution method and formula: definite integral version

Suppose we are given the initial value condition that at x=x0,y=y0.

Let H(x) be an antiderivative for p(x), so that H(x)=p(x). Then, we multiply both sides by eH(x). Simplifying, we get:

ddx[eH(x)y]=q(x)eH(x)

Integrating from x0 to (arbitrary) x, we get:

eH(x)yeH(x0)y0=x0xq(t)eH(t)dt

Thus, the general expression is:

y=eH(x)(eH(x0)y0+x0xq(t)eH(t)dt)

Examples

Simple example

Consider the differential equation:

y+y=eex

Here, p(x)=1,q(x)=eex. Take H(x)=x and get:

y=exeexexdx

This gives:

y=ex(eex+C),CR

Example that is better solved by subtitution

Consider:

xy+y=sinx

Divide both sides by x to get:

y+yx=sinxx

This is linear, with p(x)=1/x, q(x)=(sinx)/x. Take H(x)=lnx and eH(x)=x (see note):

y=1xsinxxxdx

This gives:

y=Ccosxx,CR

The linear method is unnecessary -- we divided and multiplied by x. A better solution would be to substitute u=xy and get a separable differential equation.

Example where a particular solution is obtained by inspection

Consider:

y+y=tanx+tan2x

The linear method gives:

y=exex(tanx+tan2x)dx

The integration is not easy. So, instead of trying to do the integration directly, we note that the answer is:

y=Particular solution+Cex

It thus suffices to find a particular solution. Inspection and guesswork gives a solution y=tanx1. The general solution is thus:

y=tanx1+Cex