Partial Differential Equations PowerTool
by Dr. Jim Herod
Section 3.2: Homogeneous and Non-homogeneous Differential Equations
Maple Packages for Section 3.2
| > | restart; |
| > |
We want to get a sense for what is a first order differential equation and what is a second order differential equation, for what is a homogeneous differential equation and what is a non-homogeneous differential equation, and for what is an initial value problem and what is a boundary value problem. We illustrate these ideas with examples.
Here is a first order differential equation :
= 3
+ 4.
Here is a second order differential equation :
+ 9
+ 3
y
(
t
) + 4 = 0.
Here is a first order, homogeneous differential equation :
= 3
y
(
t
).
Here is a first order, non-homogeneous differential equation :
= 3
+ 4.
Here is a second order, initial value differential equation :
+ 9
= 0, y(0) = 0, y '(0) = 3.
Here is a second order, boundary value differential equation :
+ 9
= 0, y(0) = 0, y (
) = 0.
In this Section, we solve our first partial differential equation. It is the intent that by first solving two ordinary differential equations which have the same flavor, the partial differential equation will be seen as a natural extension of the ordinary differential equations ideas. In each problem, to make the analogy, we follow the same steps.
Problem 1. Graph the solution for the differential equation y ' = - 2 y + 3, y(0) = 5.
Step 1: Find a particular (independent of time) solution
0 = -2 y + 3, so that y = 3/2.
Step 2: Find the general solution for the associated homogeneous equation
y ' = -2 y, so that y(t) = exp(-2t) C.
Step 3: Add these two to get the general solution to the non-homogeneous equation, so that
y(t) = exp(-2 t) C + 3/2.
Step 4: Find the solution for the non-homogeneous equation which satisfies the initial condition, so that
5 = y(0) = C + 3/2 and C = 7/2.
Here is a check of the solution we have found and the graph.
| > | y1:=t->exp(-2*t)*7/2 + 3/2; |
| > | y1(0); diff(y1(t),t)+2*y1(t)-3; |
| > | plot(y1(t),t=0..1,y1=0..6); |
| > |
Answer Using Maple
Maple can solve the problems without bothering us with any steps.
| > | dsolve({diff(y(t),t)=-2*y(t)+3,y(0)=5},y(t)); |
| > |
Problem 2. Suppose that A is an invertable matrix and that v is a vector. Graph the solution for the differential equation
Z ' = A Z + v, Z(0) = [2,3].
Step 1: Find a particular (independent of time) solution
0 = A Z + v, so that Z =
v.
Step 2: Find the general solution for the associated homogeneous equation
Z ' = A y, so that Z(t) = exp(A t) C.
Step 3: Add these two to get the general solution to the non-homogeneous equation, so that
Z(t) = exp(A t) C
v .
Step 4: Find the solution for the non-homogeneous equation which satisfies the initial condition, so that
[2, 3] = Z(0) = C
v and C = [2, 3] +
v.
We provide a particular A and a particular v in order to work out the details.
| > | restart: with(linalg): |
Warning, the protected names norm and trace have been redefined and unprotected
| > | A:=matrix([[-3,1],[1,-3]]); |
| > | v:=[5,7]; |
| > | C:=evalm([2,3]+inverse(A)&*v); |
| > | Z:=evalm(exponential(A,t)&*C-inverse(A)&*v); |
| > | x2:=unapply(Z[1],t); y2:=unapply(Z[2],t); |
| > | x2(0),y2(0); |
| > | plot([x2(t),y2(t),t=0..20],x=0..4,y=0..4); |
| > |
Answer Using Maple
Again, Maple will solve this equation without any help from the user.
| > | dsolve({diff(x(t),t)=A[1,1]*x(t)+A[1,2]*y(t)+v[1], diff(y(t),t)=A[2,1]*x(t)+A[2,2]*y(t)+v[2], x(0)=2, y(0)=3}, {x(t),y(t)}); |
| > |
Problem 3: Graph the solution for the partial differential equation
, u(t, 0) = 3, u(t, 2) = 5, with u(0, x) = f(x).
This problem has non-homogeneous boundary conditions . Homogeneous boundary conditions would be that the solution is zero at x = 0 and at x = 2 for all t.
Step 1: Find a particular (independent of time) solution
0 =
with u(0) = 3 and u(2) = 5.
This is just an ordinary differential equation 0 = u '', with boundary conditions. The solution for this equation is
u(x) = x + 3.
Step 2: Find the general solution for the homogeneous equation
=
with u(t, 0) = 0 and u(t, 2) = 0.
We will see later in Sections to follow that the general solution for this equation is
u(t, x) =
.
Remark: to make this last statement believable, we will make the following illustration.
| > | restart; |
| > | u:=(t,x)->sum(C[n]*exp(-n^2*Pi^2*t/4)*sin(n*Pi*x/2),n=1..20); |
| > | u(t,0); u(t,2); |
| > | diff(u(t,x),t)-diff(u(t,x),x,x); |
| > |
Step 3: Add these two to get the general solution to the non-homogeneous equation, so that
u(t, x) = x + 3 +
.
Step 4: Find the solution for the non-homogeneous equation which satisfies the initial condition, so that
f(x) = x + 3 +
for 0 < x < 2.
This looks like a job for Fourier Series. Perhaps you would agree that
=
.
In order to draw a graph, we need to be specific about
f
. For simplicity, choose
f
to be
f
(
x
) =
. We know how the graph of this looks on [0, 2]. We will compute five terms of the series and draw that graph.
| > | f:=x->x^2-x+3; |
| > | for n from 1 to 10 do C[n]:=int((f(x)-x-3)*sin(n*Pi*x/2),x=0..2)/ int(sin(n*Pi*x/2)^2,x=0..2); end do; n:='n': |
| > | u:=(t,x)->x+3+sum(C[n]*exp(-n^2*Pi^2*t/4)*sin(n*Pi*x/2),n=1..10); |
Before drawing the graph, think about what you expect: when t = 0, you should expect a quadratic. There after, the graph stays fixed on the ends and has limit the time independent solution which is x + 3.
| > | plot3d(u(t,x),x=0..2,t=0..1,axes=NORMAL,orientation=[-135,45]); |
| > |
Answer Using Maple
We take a look at what Maple can do with this equation. Here is a first look. Type in the equation.
| > | restart; |
| > | eq:=diff(u(t,x),x)=diff(u(t,x),t,t); |
| > |
Ask Maple to solve the partial differential equation.
| > | pdsolve(eq); |
The answer given is to use a product of solutions which Maple calls F1( t ) and F2( x ). Maple's answer is to provide ordinary differential equations which these two functions should satisfy. Indeed, our solution to the homogeneous partial differential equation is precisely this: an exponential function which solves a first order equation in x and a trig function which satisfies a second order equation in t .
In this Section, we have made an analogy for solving non-homogeneous ordinary differential equations and non-homogeneous partial differential equations. We had to assume the form for the solutions to the homogeneous partial differential equation at this point. Later, in these notes, we will develop this solution.
EMAIL: herod@math.gatech.edu or jherod@tds.net
URL: http://www.math.gatech.edu/~herod
Copyright © 2003 by James V. Herod
All rights reserved