Example 3.9 Heat Transfer in a Fin 

The heat transfer problem solved in example 3.1 can be solved using Maple's 'dsolve' command as follows: 

> restart:
 

> with(plots):
 

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

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

> BCs:=y(0)=1,D(y)(1)=0;
 

y(0) = 1, (D(y))(1) = 0 (2)
 

> sol:=dsolve({eq,BCs},y(x));
 

y(x) = `+`(`/`(`*`(exp(`+`(`-`(H))), `*`(exp(`*`(H, `*`(x))))), `*`(`+`(exp(H), exp(`+`(`-`(H)))))), `/`(`*`(exp(H), `*`(exp(`+`(`-`(`*`(H, `*`(x))))))), `*`(`+`(exp(H), exp(`+`(`-`(H))))))) (3)
 

The solution obtained can be stored in ya as: 

> ya:=rhs(sol);
 

`+`(`/`(`*`(exp(`+`(`-`(H))), `*`(exp(`*`(H, `*`(x))))), `*`(`+`(exp(H), exp(`+`(`-`(H)))))), `/`(`*`(exp(H), `*`(exp(`+`(`-`(`*`(H, `*`(x))))))), `*`(`+`(exp(H), exp(`+`(`-`(H))))))) (4)
 

The solution can be converted to trigonometric form and simplified further as 

> ya:=convert(ya,trig);
 

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

> ya:=combine(ya);
 

`/`(`*`(cosh(`+`(`-`(H), `*`(H, `*`(x))))), `*`(cosh(H))) (6)
 

We observe that 'dsolve' gives a longer solution compared to the matrix exponential method (example 3.1).  As an exercise readers can verify that the solution obtained by the matrix exponential method and the solution obtained here using Maple's 'dsolve' command are equivalent. 

>