Maple 2019 Questions and Posts

These are Posts and Questions associated with the product, Maple 2019

I am trying to find what the meaning of the values that _LatexSmallFractionConstant accepts and what they do.

For example

mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=34:
latex(simplify(mu))

{1 \left( 4\,t+1 \right) ^{-{\frac{8}{5}}} \left( t-1 \right) ^{-{
\frac{7}{5}}}}

Which renders wrong as follows

But when I set _LatexSmallFractionConstant to 35 instead of 34 this is what happens

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=35:
latex(simplify(mu))

{\frac {1}{ \left( t-1 \right) ^{{\frac{7}{5}}}} \left( 4\,t+1
 \right) ^{-{\frac{8}{5}}}}

which renders as a little better as

And when I set it to _LatexSmallFractionConstant:=100 it becomes good

However, no settings value will make latex render this fraction correctly

restart;
mu:=1/(x+y);
_LatexSmallFractionConstant:=2000000000:
latex(mu)

           \left( x+y \right) ^{-1}

But if I set it to 35 again now it fails to handle fraction right

restart;
mu:=1/2;
_LatexSmallFractionConstant:=35:
latex(mu)

    1/2

but changing to  either zero or 1 or 2 makes it generate the correct latex

restart;
mu:=1/2;
_LatexSmallFractionConstant:=0:  #1 and 2 also works. By anything larger it goes back to 1/2
latex(mu)

    {\frac{1}{2}}  #but why extra {} ??

 

So it seems some values makes it work OK (35 for top example) but same value makes it not work well for another example.

It seems like random settings to me.

Where is all of this documented?  I can't find it in help. Which file to print to see what this option does?

Maple 2019.1  on windows.


 

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=34:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{1 \left( 4\,t+1 \right) ^{-{\frac{8}{5}}} \left( t-1 \right) ^{-{
\frac{7}{5}}}}

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=35:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{\frac {1}{ \left( t-1 \right) ^{{\frac{7}{5}}}} \left( 4\,t+1
 \right) ^{-{\frac{8}{5}}}}

restart;
mu:=1/((4*t+1)^(8/5)*(t-1)^(7/5));
_LatexSmallFractionConstant:=100:
latex(mu)

1/((4*t+1)^(8/5)*(t-1)^(7/5))

{\frac {1}{ \left( 4\,t+1 \right) ^{8/5} \left( t-1 \right) ^{7/5}}}

restart;
mu:=1/(x+y);
_LatexSmallFractionConstant:=2000000000:
latex(mu)

1/(x+y)

 \left( x+y \right) ^{-1}

restart;
mu:=1/2;
_LatexSmallFractionConstant:=3:
latex(mu)

1/2

1/2

restart;
mu:=1/2;
_LatexSmallFractionConstant:=0:
latex(mu)

1/2

{\frac{1}{2}}

 


 

Download bug_july_17_2019.mw

This is really a FYI more than a question, since I do not expect any more to be able to fix these since they are part of old Maple code called algolib, downloaded from  http://algo.inria.fr/libraries/   

I was trying to see if the latex command included in the above will work better than Maple own latex command.  I downloaded the tar file from the above http://algo.inria.fr/libraries/17.0/algolib.tar    and extracted it.  

At first I could not find where the latex command is, since it is not part of the .mla. After some struggle, I found I can get their latex command to work if I read the following 6 .mpl files (in this order) that show up after opening the above tar file

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";

Once I did the above, now I could do the command

MADLaTeX:-latex(sol);

#or 

MADLaTeX:-latex(sol,'string')

And these work now. For example

MADLaTeX:-latex(1/2)

         \frac{1}{2}

So I said, great, finally a Maple latex command that knows how to convert a fraction to latex the right way. Much better than Maple's latex command default output 

latex(1/2)

         1/2

But when I started testing it more, I found many problems. So I am posting these issues, since I do not know where to send them to, as this package is no longer being maintained. May be some Maple expert can figure how to fix them if there is an interest.  I looked at the code above, and too complicated for me to even figure where to look and how to fix these.

restart;

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";

#EXAMPLE 1

V:=x->piecewise(0<=x and x<=a,0,infinity);
ic:=f(x,0)=piecewise(0<=x and x<=a,A*x*(a-x),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);

V := proc (x) options operator, arrow; piecewise(0 <= x and x <= a, 0, infinity) end proc

ic := f(x, 0) = piecewise(0 <= x and x <= a, A*x*(a-x), 0)

pde := I*h*(diff(f(x, t), t)) = -h^2*(diff(f(x, t), x, x))/(2*m)+piecewise(0 <= x and x <= a, 0, infinity)*f(x, t)

f(x, t) = piecewise(0 <= x and x <= a, A*x*(a-x), 0)+Sum(t^n*((proc (U) options operator, arrow; -I*(-(1/2)*h^2*(diff(diff(U, x), x))/m+piecewise(0 <= x and x <= a, 0, infinity)*U)/h end proc)@@n)(piecewise(0 <= x and x <= a, A*x*(a-x), 0))/factorial(n), n = 1 .. infinity)

f(x,t) = piecewise(0 <= x and x <= a,A*x*(a-x),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*(a-x),0))/n!,n = 1 .. infinity)

MADLaTeX:-latex(sol)

Error, (in typetomath) 0 <= x and x <= a: invalid for math mode

latex(sol)

f \left( x,t \right) =
\cases{Ax \left( a-x \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( a-x \right) &$0\leq x$\  and \ $x\leq a$\cr 0&otherwise\cr}
 \right) }{n!}}

#EXAMPLE 2

pde := diff(v(t, s), t) +s^2*(diff(v(t, s), s, s))/(2*sigma^2)+(r-q)*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);

diff(v(t, s), t)+(1/2)*s^2*(diff(diff(v(t, s), s), s))/sigma^2+(r-q)*s*(diff(v(t, s), s))-r*v(t, s) = 0

v(T, s) = psi(s)

v(t, s) = psi(s)+Sum((t-T)^n*((proc (U) options operator, arrow; -(1/2)*(diff(diff(U, s), s))*s^2/sigma^2+s*(-r+q)*(diff(U, s))+r*U end proc)@@n)(psi(s))/factorial(n), n = 1 .. infinity)

v(t,s) = psi(s)+Sum((t-T)^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)

MADLaTeX:-latex(sol)

Error, (in symbol/string) only ANSI-C compliant symbols are handled

latex(sol)

v \left( t,s \right) =\psi \left( s \right) +\sum _{n=1}^{\infty }{
\frac { \left( t-T \right) ^{n} \left( U\mapsto rU^{ \left( n \right)
} \right)  \left( \psi \left( s \right)  \right) }{n!}}

#EXAMPLE 3

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)

0

diff(u(x, t), t) = k*(diff(diff(u(x, t), x), x))-u(x, t)*x

u(x, 0) = sin(x)

u(0, t) = 0, u(Pi, t) = 0

u(x, t) = `casesplit/ans`(Sum(-(AiryBi(-lambda[n]/k^(1/3))*AiryAi((-lambda[n]+x)/k^(1/3))-AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi(-lambda[n]/k^(1/3)))*((Int(sin(x)*AiryBi((-lambda[n]+x)/k^(1/3)), x = 0 .. Pi))*AiryAi(-lambda[n]/k^(1/3))-AiryBi(-lambda[n]/k^(1/3))*(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(-lambda[n]/k^(1/3))^2-2*AiryBi(-lambda[n]/k^(1/3))*(Int(AiryBi((-lambda[n]+x)/k^(1/3))*AiryAi((-lambda[n]+x)/k^(1/3)), x = 0 .. Pi))*AiryAi(-lambda[n]/k^(1/3))+AiryBi(-lambda[n]/k^(1/3))^2*(Int(AiryAi((-lambda[n]+x)/k^(1/3))^2, x = 0 .. Pi))), n = 0 .. infinity), {And(AiryAi((-lambda[n]+Pi)/k^(1/3))*AiryBi(-lambda[n]/k^(1/3))-AiryBi((-lambda[n]+Pi)/k^(1/3))*AiryAi(-lambda[n]/k^(1/3)) = 0, -infinity <= lambda[n] and lambda[n] <= infinity)})

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])^2-2*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)})

MADLaTeX:-latex(sol)

Error, (in typetomath) -infinity <= lambda[n] and lambda[n] <= infinity: invalid for math mode

latex(sol)

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)

 

 


 

Download bugs_in_aldor_latex.mw

 

so i just went from a really old version of maple to a the newest one maple 2019 and at first glance it doesn't seem to work correctly please take a look at the picture maybe there is a toggle i missed or something of the sorts thanks you for your time 

I have a tough integral I'm trying to solve (see attatched code). Maple seems to be able to compute it if I instruct it to integrate by parts, however the solutions don't make sense. For example, if I differentiate the result I expect to get my original integrand, but I do not. Furthermore, depending on which function you choose as 'u' and which as 'dv' when integrating by parts yields different results.

071319_Integral.mw

The attatched code has four examples:

1) Definite integration by parts

2) Indefinite integration by parts

3) Indefinite integration by parts, alternate choice of 'u'

4) Definite integration by parts, alternate choice of 'u'

and after each indefinite integration, I differentiate the result to compare with the orginal integrand.

What is going on here?

Hi,
I would like to trace periodic functions. I saw that this was possible with the old 'FourierSeries' package with the "Rept" command. How to reproduce the same thing in the Maple 19 environment? Thank you

fs_examples.mw

fyi, there seems to be a problem here. Maple 2019, Physics version 395 on windows 10.

The solution given to this wave PDE by Maple as sum that starts from zero, has "n" in the denominator. When n=0, this gives division by zero.  Is this a bug?

restart;
L:=3: c:=4: h:=1/10: b:=Pi*c/L:
f:=piecewise(0<=x and x<=L/3,3*h/L*x,L/3<x and x<=L,h):
pde := diff(u(x,t),t$2) + b*diff(u(x,t),t) = c^2*diff(u(x,t),x$2):
bc  := u(0,t)=0,D[1](u)(L,t)=0:
ic  := D[2](u)(x,0)=0,u(x,0)=f:
sol:=pdsolve([pde,bc,ic],u(x,t));
subs(n=0,sol)

u(x, t) = Sum(-((3/10)*I)*sin((1/6)*(1+2*n)*Pi*x)*(3^(1/2)*sin((1/3)*Pi*n)+cos((1/3)*Pi*n))*((2*I)*exp((4/3)*t*(I*n^(1/2)*(n+1)^(1/2)-1/2)*Pi)*n^(1/2)*(n+1)^(1/2)+(2*I)*exp(-(4/3)*(I*n^(1/2)*(n+1)^(1/2)+1/2)*t*Pi)*n^(1/2)*(n+1)^(1/2)+exp((4/3)*t*(I*n^(1/2)*(n+1)^(1/2)-1/2)*Pi)-exp(-(4/3)*(I*n^(1/2)*(n+1)^(1/2)+1/2)*t*Pi))/(n^(1/2)*(n+1)^(1/2)*Pi^2*(1+2*n)^2), n = 0 .. infinity)

Error, numeric exception: division by zero

 


 

Download bug_july_11_2019.mw

 

 I'm confused as to why Maple can't perform a certain integral for me. Please see my attached code - it get's stuck on the last step.

 

070919_ThetaIntegral.mw

Does anyone know how collect zero epsilon coefficient from follow expression?

coeff_test.mw

Is it possible?

Thank you!

I am able to generate random polynomials with non-zero coefficents, and define sets of all the positive divisors of the leading coefficient and the constant terms. My question is this, how may I apply the rational zeros theorem to generate the set of all possible rational zeros of the polynomial. I basically need to form all the possible quotients (positive and negative) with numerator in one set and denominator in the other set, ignoring duplicates. The attached worksheet has what I've done so far.rational_zeros.mw
 

attempt := 1; while attempt > 0 do q := randpoly(x, coeffs = rand(-9 .. 9), degree = 3, dense); if nops(q) = 4 then attempt := -2 end if; attempt := attempt+1 end do; q

5*x^3+3*x^2-4*x-8

(1)

NumberTheory[Divisors](coeff(q, x, 3))

{1, 5}

(2)

NumberTheory[Divisors](coeff(q, x, 0))

{1, 2, 4, 8}

(3)

``


 

Download rational_zeros.mw

 

The command eval allows to simplify a complicated expression

in a more compact form for a later output in LATEX

In the example which follows I was able to insert A and B but non C in the expression.

There is already a post on this kind of topic but I failed to understand the details.

Perhaps a Maple worksheet of answer on this topic  would be useful !

bye Lorenzo
 

restart;

expression:=exp(-b*x^c/2)*((x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c)) + c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c)))*c*WhittakerM((-c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c) + b^(-(3*c + a + 1)/(2*c))*x^(-(3*c)/2 + a/2 + 1/2)*WhittakerM((c + a + 1)/(2*c), (2*c + a + 1)/(2*c), b*x^c)*(c + a + 1)^2)/((a + 1)*(c + a + 1)*(2*c + a + 1));

exp(-(1/2)*b*x^c)*((x^(-(3/2)*c+(1/2)*a+1/2)*(c+a+1)*b^(-(1/2)*(3*c+a+1)/c)+c*x^((1/2)*a+1/2-(1/2)*c)*b^(-(1/2)*(c+a+1)/c))*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(1)

``

(2)

expression_ABC:=eval(expression,[x^(-(3*c)/2 + a/2 + 1/2)*(c + a + 1)*b^(-(3*c + a + 1)/(2*c))=A,c*x^(a/2 + 1/2 - c/2)*b^(-(c + a + 1)/(2*c))=B,((a + 1)*(c + a + 1)*(2*c + a + 1))=C]);

exp(-(1/2)*b*x^c)*((A+B)*c*WhittakerM((1/2)*(-c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)+b^(-(1/2)*(3*c+a+1)/c)*x^(-(3/2)*c+(1/2)*a+1/2)*WhittakerM((1/2)*(c+a+1)/c, (1/2)*(2*c+a+1)/c, b*x^c)*(c+a+1)^2)/((a+1)*(c+a+1)*(2*c+a+1))

(3)

 

 

 

 


 

Download maple_primes_eval.mw

 

Hi

 

I've just installed Maple latest + MapleSim with the license provided by my university (I use VPN with a secure key to remotely access server license. Everything works fine, except for the context menu. It seems that the context menu module is missing! I tried uninstalling and reinstalling, but did not help.

 

I went back to the campus and checked Maple installation on computers there, and this problem is absent (context menu is working fine).

 

I can only use the context menu toolbar on the right... but this is not very convenient. 

What could be the problem? See the attached image.

 

Thanks

---------------------

 

Hi!

How to calculate  a value in MAPLE:

My code:

evalf(eval(diff(n*Zeta(n, 3), n), n = 3)); give me:

#-0.3740436824 + 3.*eval(diff(Zeta(n, 3), n), {n = 3}) ,it should be only:-0.3740436824

OR:

fdiff(n*Zeta(n, 3), [n], n = 3);

#fdiff(n -> n*Zeta(n, 3), [1], [3]) ???

It's a Bug  or (As Designed / Not a Bug) ?

Thanks in advance.

 

Mathematica code:

D[n*Derivative[n][Zeta][3], n] /. n -> 3 // N;

(* -0.374044*)

 

 

I just used Maple for the first time to find the roots of an equation, the problem they give me imaginary solutions every time I put a (ln); even for ln (1) it proposes me -265.745524189222 + 0.785398163397448 * I as a solution. Could you help me to solve this problem?

Why doesn't

f:=ln(s + 2)^2 + 2*polylog(2, -1 - s) + 2*polylog(2, (1 + s)/(s + 2))

simplify to zero assuming s>0?

I solved this PDE by hand to verify Maple's solution. I think Maple solution is wrong. This PDE is the heat PDE on a bar (1D) with boundary coditions on both ends are function of time and zero initial conditions.

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = A(t), u(1, t) = B(t):
ic := u(x, 0) = 0:
sol1:=pdsolve([pde, ic, bc], u(x, t));

#now try when A(t)=sin(t),B(t)=t, use 20 terms for the sum
sol2:=simplify(subs([infinity=20,B(tau)=tau,A(tau)=sin(tau),A(0)=0,B(0)=0,A(t)=sin(t),B(t)=t],sol1)):
sol3:=simplify(value(subs(t=1,sol2))):
evalf(subs(x=0.5,sol3))

 

Also doing pdetest(sol1,pde); on the above solution does ot return zero as expected.

To verify more, I solved the same PDE again, but now using an explicit values for the boundary conditions A(t), B(t). Using A(t)=sin(t), B(t)=t. Then found the value again of the solution u at x=0.5 and t=1 like in the above, and it gives different value:

unassign('A,B,x,t,L,k,f');
pde := diff(u(x,t),t)= diff(u(x,t),x$2):
bc := u(0, t) = sin(t), u(1, t) = t:
ic := u(x, 0) = 0:
sol4:=pdsolve([pde, ic, bc], u(x, t));
sol5:=simplify(subs(infinity=20,sol4)):
sol6:=simplify(value(subs(t=1,sol5))):
evalf(subs(x=0.5,sol6))

Then I typed my hand solution into Maple and for the same values x=0.5, t=1 and same number of terms, I also get the same value 0.819. 

I do not see at all where the function sin integral should come into play in this solution. 

Could some Maple expert please check to see what is going on with this solution to Maple? 

Using Maple 2019.1 and Physics version 370

 

1 2 3 4 5 6 Page 1 of 6