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 

 

Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mo( 

Typesetting:-mrow(Typesetting:-mo(Typesetting:-mrow(Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mn( 

 

 

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

 

> restart:
 

> with(linalg):with(plots):
 

> N:=2;
 

2 (1)
 

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

`+`(diff(diff(theta(x), x), x), `-`(`*`(`^`(H, 2), `*`(theta(x))))) (2)
 

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

`:=`(A, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (3)
 

> mat:=exponential(A,x);
 

`:=`(mat, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mverbatim( (4)
 

The exponentials are converted to trigonometric form for convenience. 

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

`:=`(mat, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mverbatim( (5)
 

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

`:=`(Y0, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mn( (6)
 

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

`:=`(sol, Typesetting:-mfenced(Typesetting:-mrow(Typesetting:-mtable(Typesetting:-mtr(Typesetting:-mtd(Typesetting:-mrow(Typesetting:-mverbatim( (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 Typesetting:-mrow(Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi( 

> theta:=sol[1,1];
 

`+`(cosh(`*`(H, `*`(x))), `/`(`*`(sinh(`*`(H, `*`(x))), `*`(c[1])), `*`(H))) (8)
 

> dthetadx:=sol[2,1];
 

`+`(`-`(`*`(`/`(1, 2), `*`(H, `*`(`+`(cosh(`*`(H, `*`(x))), `-`(sinh(`*`(H, `*`(x))))))))), `*`(`/`(1, 2), `*`(H, `*`(`+`(cosh(`*`(H, `*`(x))), sinh(`*`(H, `*`(x))))))), `*`(cosh(`*`(H, `*`(x))), `*`(... (9)
 

The boundary condition at x = 1 is applied to solve for cTypesetting:-mrow(Typesetting:-msub(Typesetting:-mi( 

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

`+`(`-`(`*`(`/`(1, 2), `*`(H, `*`(`+`(cosh(H), `-`(sinh(H))))))), `*`(`/`(1, 2), `*`(H, `*`(`+`(cosh(H), sinh(H))))), `*`(cosh(H), `*`(c[1]))) = 0 (10)
 

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

`+`(`-`(`/`(`*`(H, `*`(sinh(H))), `*`(cosh(H))))) (11)
 

This value of the constant cTypesetting:-mrow(Typesetting:-msub(Typesetting:-mi( 

> theta:=eval(theta);
 

`+`(cosh(`*`(H, `*`(x))), `-`(`/`(`*`(sinh(`*`(H, `*`(x))), `*`(sinh(H))), `*`(cosh(H))))) (12)
 

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

> theta:=combine(theta);
 

`/`(`*`(cosh(`+`(`*`(H, `*`(x)), `-`(H)))), `*`(cosh(H))) (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];
 

[1, 2, 5, 10] (14)
 

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

[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]);
 

Plot_2d
 

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]);
 

Plot
 

>
 

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

>