Example 3.1 Exponential Method for Linear Boundary Value Problem

Consider the conduciton of heat in a rectangular cooling fin. The governing differential equation[6] in dimensionless form is

This boundary value problem is solved below by following the procedure described earlier.

> | restart:

> | with(linalg):with(plots):

> | N:=2;

| (1)

> | eq:=diff(theta(x),x$2)-H^2*theta(x);

| (2)

> | A:=matrix(N,N,[0,1,H^2,0]);

| (3)

> | mat:=exponential(A,x);

| (4)

The exponentials are converted to trigonometric form for convenience.

> | mat:=map(convert,mat,trig);

| (5)

> | Y0:=matrix(N,1,[1,c[1]]);

| (6)

> | sol:=evalm(mat&*Y0);

| (7)

The solution is obtained as a function of x, H and the unknown initial condition c1. The first row of sol corresponds to w0 and the second row corresponds to

> | theta:=sol[1,1];

| (8)

> | dthetadx:=sol[2,1];

| (9)

The boundary condition at x = 1 is applied to solve for c

> | bc2:=subs(x=1,dthetadx)=0;

| (10)

> | c[1]:=solve(bc2,c[1]);

| (11)

This value of the constant c

> | theta:=eval(theta);

| (12)

The expression for θ can be simplified further by using Maple's 'combine' command:

> | theta:=combine(theta);

| (13)

You can make plots for different values of the heat transfer coefficient, H, by using a 'pars' array and a' do' loop.

> | pars:=[1,2,5,10];

| (14)

> | clr:=[red,green,gold,blue];

| (15)

> | for i from 1 to 4 do p[i]:=plot(subs(H=pars[i],theta),x=0..1,color=clr[i]):od:

> | display(seq(p[i],i=1..4),thickness=4,title="Figure 3.1.1",axes=boxed,labels=["X","theta"],labeldirections=[HORIZONTAL,VERTICAL]);

A three dimensional plot for θ can be made for different values of H as x varies between zero and one.

> | plot3d(theta,x=0..1,H=0..10,axes=boxed,title="Figure 3.1.2",orientation=[45,45]);

> |

The above picture shows that as H increases the temperature distribution becomes nonuniform.

> |