%% Created by Maple 9.5, Linux
%% Source Worksheet: /var/www/html/mikesullivan/Courses/305/LectureNotes/HeatSquare.mw
%% Generated: Thu Apr 13 13:20:07 CDT 2017
\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}
\DefineParaStyle{Maple Heading 4}
\DefineParaStyle{Maple Heading 2}
\DefineParaStyle{Maple Text Output}
\DefineParaStyle{Maple Bullet Item}
\DefineParaStyle{Maple Warning}
\DefineParaStyle{Maple Error}
\DefineParaStyle{Maple Dash Item}
\DefineParaStyle{Maple Heading 3}
\DefineParaStyle{Maple Heading 1}
\DefineParaStyle{Maple Title}
\DefineParaStyle{Maple Normal}
\DefineCharStyle{Maple 2D Input}
\DefineCharStyle{Maple Maple Input}
\DefineCharStyle{Maple 2D Output}
\DefineCharStyle{Maple 2D Math}
\DefineCharStyle{Maple Hyperlink}
\begin{document}
\pagestyle{empty}
\begin{center}\begin{Maple Normal}{\normalsize{}}{\Large{\textbf{Heat Equation on a square plate}}}\end{Maple Normal}\end{center}

\begin{center}\begin{Maple Normal}{\normalsize{}}\end{Maple Normal}\end{center}
\begin{Maple Normal}{\normalsize{L=0. Alpha=1. f(x,y) = (x-0.5)\symbol{94}2 + (y-0.5)\symbol{94}2. 

The command below defines the coeficients. }}\end{Maple Normal}

\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{c := (m,n) -\TEXTsymbol{>} 4*int(int( sin(n*Pi*x) * sin(m*Pi*y) * ((x-.5)\symbol{94}2 + (y-.5)\symbol{94}2),x=0..1),y=0..1);}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{maplelatex}
\QTR{Maple 2D Output}{\mapleinline{inert}{2d}{c := proc (m, n) options operator, arrow; 4*int(int(sin(n*Pi*x)*sin(m*Pi*y)*((x-.5)^2+(y-.5)^2), x = 0 .. 1), y = 0 .. 1) end proc}{%
$c\, := \,( {m,n} )\mapsto { 8.321291784\times 10^{-30}}\\
\mbox{}\,{\frac {-{ 9.869604400\times 10^{27}}\\
\mbox{}\,{n}^{2}-{ 9.869604404\times 10^{27}}\\
\mbox{}\,{m}^{2}+{ 2.435227276\times 10^{28}}\\
\mbox{}\,{n}^{2}{m}^{2}+{ 9.869604404\times 10^{27}}\\
\mbox{}\,\cos \left(  3.141592654\,n \right) {m}^{2}+{ 9.869604400\times 10^{27}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,n \right) -{ 2.435227276\times 10^{28}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,n \right) {m}^{2}+{ 1.550313834\times 10^{28}}\\
\mbox{}\,n\sin \left(  3.141592654\,n \right) {m}^{2}-{ 2.435227276\times 10^{28}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,m \right) {m}^{2}+{ 9.869604400\times 10^{27}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,m \right) \\
\mbox{}+{ 1.550313834\times 10^{28}}\\
\mbox{}\,{n}^{2}m\sin \left(  3.141592654\,m \right) +{ 9.869604404\times 10^{27}}\\
\mbox{}\,{m}^{2}\cos \left(  3.141592654\,m \right) \\
\mbox{}-{ 9.869604404\times 10^{27}}\\
\mbox{}\,\cos \left(  3.141592654\,n \right) \cos \left(  3.141592654\,m \right) {m}^{2}+{ 2.435227276\times 10^{28}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,n \right) \cos \left(  3.141592654\,m \right) {m}^{2}-{ 9.869604400\times 10^{27}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,n \right) \cos \left(  3.141592654\,m \right) -{ 1.550313834\times 10^{28}}\\
\mbox{}\,{n}^{2}\cos \left(  3.141592654\,n \right) m\sin \left(  3.141592654\,m \right) \\
\mbox{}-{ 1.550313834\times 10^{28}}\\
\mbox{}\,n\sin \left(  3.141592654\,n \right) \cos \left(  3.141592654\,m \right) {m}^{2}}{{n}^{3}{m}^{3}}}$}
}

\end{maplelatex}
\begin{Maple Normal}{\normalsize{We plot it. }}\end{Maple Normal}

\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{with(plots):}\end{Maple Normal}}{}
\end{mapleinput}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{plot3d(sum(sum(c(m,n)*sin(n*Pi*x)*sin(m*Pi*y),m=1..100),n=1..100),x=0..1,y=0..1,title="t=0.0");}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{HeatSquareplot3d1.eps}


\end{center}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{animate(plot3d ,[sum(sum(c(m,n)*sin(n*Pi*x)*sin(m*Pi*y)*exp(-(m\symbol{94}2+n\symbol{94}2)*t),m=1..10),n=1..10),x=0..1,y=0..1],t=0..0.3,frames=100);}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{HeatSquareplot3d2.eps}


\end{center}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{plot3d(sum(sum(c(m,n)*sin(n*Pi*x)*sin(m*Pi*y)*exp(-(m\symbol{94}2+n\symbol{94}2)*0.01),m=1..100),n=1..100),x=0..1,y=0..1,view=-0.1..0.5,title="t=0.01");}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{HeatSquareplot3d3.eps}


\end{center}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{plot3d(sum(sum(c(m,n)*sin(n*Pi*x)*sin(m*Pi*y)*exp(-(m\symbol{94}2+n\symbol{94}2)*0.05),m=1..100),n=1..100),x=0..1,y=0..1,view=-0.1..0.5,title="t=0.05");}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{HeatSquareplot3d4.eps}


\end{center}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{plot3d(sum(sum(c(m,n)*sin(n*Pi*x)*sin(m*Pi*y)*exp(-(m\symbol{94}2+n\symbol{94}2)*0.1),m=1..100),n=1..100),x=0..1,y=0..1,view=-0.1..0.5,title="t=0.1");}\end{Maple Normal}}{}
\end{mapleinput}

\mapleresult
\begin{center}
\mapleplot{HeatSquareplot3d5.eps}


\end{center}
\begin{mapleinput}
\mapleinline{active}{1d}{\begin{Maple Normal}\QTR{Maple Maple Input}{}\QTR{Maple Maple Input}{}\end{Maple Normal}}{}
\end{mapleinput}


\end{document}
%% End of Maple 9.5 Output