> 
read "C:/MAPLE/algolib/mad/CommonLib.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";
read "C:/MAPLE/algolib/mad/MAD.mpl";
read "C:/MAPLE/algolib/mad/LaTeX.mpl";
read "C:/MAPLE/algolib/mad/HTMX.mpl";
read "C:/MAPLE/algolib/mad/DocumentGenerator.mpl";

> 
V:=x>piecewise(0<=x and x<=a,0,infinity);
ic:=f(x,0)=piecewise(0<=x and x<=a,A*x*(ax),0);
pde :=I*h*diff(f(x,t),t)=h^2/(2*m)*diff(f(x,t),x$2) +V(x)*f(x,t);
sol:=pdsolve([pde,ic],f(x,t)) assuming a>0;
lprint(sol);

f(x,t) = piecewise(0 <= x and x <= a,A*x*(ax),0)+Sum(t^n*((U > I*(1/2*h^2/m
*diff(diff(U,x),x)+piecewise(0 <= x and x <= a,0,infinity)*U)/h)@@n)(piecewise(
0 <= x and x <= a,A*x*(ax),0))/n!,n = 1 .. infinity)
Error, (in typetomath) 0 <= x and x <= a: invalid for math mode
f \left( x,t \right) =
\cases{Ax \left( ax \right) &$0\leq x$\ and \ $x\leq a$\cr 0&otherwise\cr}
+\sum _{n=1}^{\infty }{\frac {{t}^{n} \left( U\mapsto {\frac {i
\cases{0&$0\leq x$\ and \ $x\leq a$\cr \infty &otherwise\cr}U}{h}}^{
\left( n \right) } \right) \left(
\cases{Ax \left( ax \right) &$0\leq x$\ and \ $x\leq a$\cr 0&otherwise\cr}
\right) }{n!}}
> 
pde := diff(v(t, s), t) +s^2*(diff(v(t, s), s, s))/(2*sigma^2)+(rq)*s*(diff(v(t, s), s))r*v(t, s) = 0;
ic:=v(T, s) = psi(s);
sol:=pdsolve([pde,ic],v(t,s));
lprint(sol);

v(t,s) = psi(s)+Sum((tT)^n*((U > 1/2*diff(diff(U,s),s)*s^2/sigma^2+s*(r+q)*
diff(U,s)+r*U)@@n)(psi(s))/n!,n = 1 .. infinity)
Error, (in symbol/string) only ANSIC compliant symbols are handled
v \left( t,s \right) =\psi \left( s \right) +\sum _{n=1}^{\infty }{
\frac { \left( tT \right) ^{n} \left( U\mapsto rU^{ \left( n \right)
} \right) \left( \psi \left( s \right) \right) }{n!}}
> 
interface(showassumed=0);
pde := diff(u(x,t),t)=k*diff(u(x,t),x$2) u(x,t)*x;
ic := u(x,0)=sin(x);
bc := u(0,t)=0,u(Pi,t)=0;
sol:=pdsolve([pde,ic,bc],u(x,t)) assuming k>0;
lprint(sol)

u(x,t) = `casesplit/ans`(Sum((AiryBi(1/k^(1/3)*lambda[n])*AiryAi((lambda[n]+
x)/k^(1/3))AiryBi((lambda[n]+x)/k^(1/3))*AiryAi(1/k^(1/3)*lambda[n]))*(Int(
sin(x)*AiryBi((lambda[n]+x)/k^(1/3)),x = 0 .. Pi)*AiryAi(1/k^(1/3)*lambda[n])
AiryBi(1/k^(1/3)*lambda[n])*Int(sin(x)*AiryAi((lambda[n]+x)/k^(1/3)),x = 0
.. Pi))*(sinh(lambda[n]*t)+cosh(lambda[n]*t))/(Int(AiryBi((lambda[n]+x)/k^(1/
3))^2,x = 0 .. Pi)*AiryAi(1/k^(1/3)*lambda[n])^22*AiryBi(1/k^(1/3)*lambda[n]
)*Int(AiryBi((lambda[n]+x)/k^(1/3))*AiryAi((lambda[n]+x)/k^(1/3)),x = 0 .. Pi
)*AiryAi(1/k^(1/3)*lambda[n])+AiryBi(1/k^(1/3)*lambda[n])^2*Int(AiryAi((
lambda[n]+x)/k^(1/3))^2,x = 0 .. Pi)),n = 0 .. infinity),{And(AiryAi(1/k^(1/3)*
(lambda[n]+Pi))*AiryBi(1/k^(1/3)*lambda[n])AiryBi(1/k^(1/3)*(lambda[n]+Pi))
*AiryAi(1/k^(1/3)*lambda[n]) = 0,infinity <= lambda[n] and lambda[n] <=
infinity)})
Error, (in typetomath) infinity <= lambda[n] and lambda[n] <= infinity: invalid for math mode
u \left( x,t \right) =\mbox {{\tt `casesplit/ans`}} \left( \sum _{n=0
}^{\infty } \left( {(\sinh \left( \lambda_{{n}}t \right) +\cosh
\left( \lambda_{{n}}t \right) ) \left( {{\rm Bi}\left({\frac {
\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}{{\rm Ai}\left({\frac {\lambda
_{{n}}}{\sqrt [3]{k}}}\right)}{{\rm Bi}\left({\frac {\lambda_{{n}}}{
\sqrt [3]{k}}}\right)}{{\rm Ai}\left({\frac {\lambda_{{n}}+x}{\sqrt [
3]{k}}}\right)} \right) \left( \int_{0}^{\pi}\!\sin \left( x \right)
{{\rm Bi}\left({\frac {\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}
\,{\rm d}x{{\rm Ai}\left({\frac {\lambda_{{n}}}{\sqrt [3]{k}}}
\right)}{{\rm Bi}\left({\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}
\int_{0}^{\pi}\!\sin \left( x \right) {{\rm Ai}\left({\frac {\lambda_
{{n}}+x}{\sqrt [3]{k}}}\right)}\,{\rm d}x \right) \left( \int_{0}^{
\pi}\! \left( {{\rm Bi}\left({\frac {\lambda_{{n}}+x}{\sqrt [3]{k}}}
\right)} \right) ^{2}\,{\rm d}x \left( {{\rm Ai}\left({\frac {\lambda
_{{n}}}{\sqrt [3]{k}}}\right)} \right) ^{2}2\,{{\rm Bi}\left({\frac
{\lambda_{{n}}}{\sqrt [3]{k}}}\right)}\int_{0}^{\pi}\!{{\rm Bi}\left({
\frac {\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}{{\rm Ai}\left({\frac {
\lambda_{{n}}+x}{\sqrt [3]{k}}}\right)}\,{\rm d}x{{\rm Ai}\left({
\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}+ \left( {{\rm Bi}\left({
\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)} \right) ^{2}\int_{0}^{\pi
}\! \left( {{\rm Ai}\left({\frac {\lambda_{{n}}+x}{\sqrt [3]{k}}}
\right)} \right) ^{2}\,{\rm d}x \right) ^{1}} \right) , \left\{ {\it
And} \left( {{\rm Ai}\left({\frac {\lambda_{{n}}+\pi}{\sqrt [3]{k}}}
\right)}{{\rm Bi}\left({\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}
{{\rm Bi}\left({\frac {\lambda_{{n}}+\pi}{\sqrt [3]{k}}}\right)}{
{\rm Ai}\left({\frac {\lambda_{{n}}}{\sqrt [3]{k}}}\right)}=0,
\infty \leq \lambda_{{n}} \land \lambda_{{n}}\leq \infty \right)
\right\} \right)
