## SOLVING PDE EQUATION...

Hello Anybody can help me to write codes for PDE to solve by Galerkin finite element method or any other methods can be able to gain results? parameter omega is unknown and should be determined.

I attached a pdf file for more .

Thanks so much

 >
 >
 (1)
 > #BCs can be from following
 (2)
 >
 (3)
 >

buchanan2005.pdf

## where is _LatexSmallFractionConstant documented?...

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 \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)

{\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)

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

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

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

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

1/2

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

{\frac{1}{2}}

 >

## too many problems using algolib latex in Maple...

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


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

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)})

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)

 >
 >

## General Procedure For Array Interpolation ...

So, I am trying to write a method for array interpolation. I have a Matrix that is X by 3, where each column holds specific data (column 1 holds independent data 1, column 2 holds independent data 2, column 3 holds dependent data).

This data comes from a function with 2 independent variables, and I am creating a graph of this function, basically, with both independent variables going from 0 to 1 (approximately 300 values per variable, giving me a matrix with 90k values already). My goal is to use interpolation to get a lot of values in between the points I already calculated.

That being said, I don't know how to use the ArrayInterpolation command to achieve this. I will post my code below if anyone can help me out!

Code:

Interpolate := proc(M::Matrix)
local i; local j;
local M1 := Matrix(RowDimension(M),1);
local M2 := Matrix(RowDimension(M),1);
local M3 := Matrix(RowDimension(M),1);
for i from 1 to RowDimension(M) do
M1(i) := M(i,1);
M2(i) := M(i,2);
M3(i) := M(i,3);
end do;
print(M1,M2,M3);
local M4 := Matrix(1000,1);
local M5 := Matrix(1000,1);
for j from 1 to 1000 do
M4(j,1) := 0.001*j;
M5(j,1) := 0.001*j;
end do;
ArrayInterpolation([M1,M2],M3,[M4,M5]);
end proc;

## Why does Maple's adjoint function not flip the sig...

Hello,

I'm confused about Maple's adjoint function (in the DEtools package). When I take the adjoint of the derivative operator:

I get back simply "Dx". However, doing the calculation by hand and integrating by parts seems to indicate that this should return the negative of Dx. The inner product I'm using is . Is Maple perhaps using a different inner product? Or is this a generalization that I'm unaware of? Or is it perhaps just a bug?

Thanks!

## What font does Tabluate() use?...

If I do:

df:=DataFrame(Matrix(3,4,[seq(1..12)]), rows=[a,b,c],columns=[A,B,C,D]);Tabulate(df, width=100)

The font that Maple uses for the Tablulate is much larger than the font used to display the Dataframe. How does one choose the font size that Tabluate() uses?

Peter

## should pdsolve give this internal error?...

I was trying to see if Maple can solve this problem from my class textbook

When I tried boundary conditions all zero on the Laplace PDE in semicircular cylinder, pdsolve generates internal error.

The boundary conditions should not all be zero for nontrivial solution, but the question is why Maple generate this internal error? Is this a bug? Using Physics package 362, Maple 2019 on windows 10.

 > restart;
 > unassign('r,theta,z,f,H'); pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0; bc:=u(r,theta,0)=0, u(r,theta,H)= f(r,theta), u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0; sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r0,theta>0,theta

 > unassign('r,theta,z,f,H'); pde:=VectorCalculus:-Laplacian(u(r,theta,z),'cylindrical'[r,theta,z])=0; bc:=u(r,theta,0)=0, u(r,theta,H)= 0, u(r,0,z)=0, u(r,Pi,z)=0,u(a,theta,z)=0; sol:=pdsolve([pde,bc],u(r,theta,z)) assuming a>0,r0,theta>0,theta

Error, (in assuming) when calling 'PDEAdvisor/2nd_order/Series/ThreeVariables'. Received: 'invalid input: rhs received _Z3, which is not valid for its 1st argument, expr'

 >

## how to use Maple to prove an equation based on a k...

Dear Maple friends~

Recently I am thinking a question about how to use Maple to prove an equation based on a known partial differential equationand its boundary conditions.

Although I can Prove it with hand computation ,it still has some difficulty and it will be really hard if its partial differential equation become more complex(As a matter of fact, it will happen).So I think of Maple and want to take advantage of computer.However,I get few ideas how to realize it .The details are as follows：

alias(u=u(x,t)):
pde:=diff(u,t)-diff(u,x$2,t)+4*u^2*diff(u,x)=3*u*diff(u,x)*diff(u,x$2)+u^2*diff(u,x$3); N:=5;#actually N can be any positive integer! bcs:=eval(u,x=-infinity)=0,seq(eval(diff(u,x$ha),x=-infinity)=0,ha=1..N),eval(u,x=infinity)=0,seq(eval(diff(u,x$ha),x=infinity)=0,ha=1..N); E:=Int(u^4+2*u^2*diff(u,x)^2-diff(u,x)^4/3,x=-infinity..infinity); #try to prove the following equation diff(E,t)=0 The written proof is as follows: Therfore,I submit such a problem and look forward your solutions and suggestions sincerely~ ## A possible bug in Maple 2019: a strange problem of... Asked by: Hello everyone, Greetings! I am facing a really strange problem. I need to write an expression, however, maple out of nowhere assigns values to the variable used. only to those which are written inside sin (). In previous versions the out put is fine. Is there a new way to write expressions in maple 2019? I am not sure.  >  > 96*sin(2*beta*y)*cos(2*beta*y)*beta^4 + 96*sin(2*beta*y)*beta^4  (1)  > Download strngmpl.mw ## Why the temperature is so high when start Maple 20... Asked by: If I have checked the Editable button just below the working window, then the temperature would be very high in the next time when I start Maple 2019. I do not what is going on. But when I unchecked the Editable button, and wait for several seconds, then the temperature and the load of my laptop are on the normal state. Is this a bug for Maple 2019? My OS is Debian Stretch, that is,$ uname -a
Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux

## why Maple hangs on this basic PDE?...

I was wondering why Maple hangs on this first order heat pde (waited for more than 15 minutes)

pde:= diff(u(x,t),t)= diff(u(x, t), x\$2) - 9*diff(u(x,t),x);
bc:=u(0,t)=0,u(1,t)=0;
ic:=u(x, 0) = exp(45/10*x)*(5*sin(Pi*x) + 9*sin(2*Pi*x) + 2*sin(3*Pi*x));
#infolevel[pdsolve]:=3;
pdsolve([pde,ic,bc],u(x,t))


It shows it hangs here:

Trying HINT = _F1(x)*_F2(t)
Trying given functional HINT ...
Third set of solution methods successful


Mathematica solves this very quickly and returns

heqn = D[u[x, t], t] == D[u[x, t], {x, 2}] - 9*D[u[x, t], x];
ic = u[x, 0] == Exp[45/10 x]*(5 Sin[Pi*x] + 9 Sin[2*Pi*x] + 2 Sin[3*Pi*x]);
bc = {u[0, t] == 0, u[1, t] == 0};
sol = DSolve[{heqn, ic, bc}, u[x, t], {x, t}]

I am asking becuase Maple normally have no problem with such PDE's so I was surprised it hangs on this one and was trying to find out why.

Other than using infolevel[pdsolve]:= what other tools should one try to debug where exactly it hangs and why?

Maple 2019, Physics V 350

## New text line problems...

Hi,

I am having issues with switching from math mode to text mode, when it comes to adding a new line of text under a line of math mode, without evaluating the math. In a previous version of Maple (not sure witch one, probably Maple 2018), I would switch from math mode to text mode by using the shortcut "command + T", followed by hitting the "->" button on the keyboard and then hit enter to start a new line in text mode. But this does not work in the latest version of maple. Does anyone have a solution for this problem?

Also, is there a way to remove the "toolbox" (i.e. "solve for"/"expand"/"simplify"/"isolate"/etc.), so it only appears when right-clicking on the expression you want to edit?

It's no secret that I liked the older versions of Maple, but I'd very much appreciate some assistance with the 2019 version!

Kind regards,

Lisa

## How to keep math expressions in Text block from ex...

My Maple Worksheets (not Maple Documents) have lots of explanetory Text blocks [..... surounding executable Math blocks ([> ..... I often insert mathematical symbols, most commonly subscripted variables, in these Text blocks.  For a simple example, consider the text block entered as

[This is a test of a subscripted variable "CTL-R" h__0 "CTL-T" in a text block.

The "CTL-R" (quotes are not actually entered) is the short cut to go into math mode, and "CTL-T" exits math mode and returns to text mode and the double underscore produces an atomic subscripted variable.

The text block actually will look like

[This is a test of a subscripted variable h0 in a text block.

The problem occurs when I reexecute the worksheet. The Text block actually produces output labeled with an equation number. For my simple example above the Text block becomes

[This is a test of a subscripted variable h0 in a text block.

[                                              h0                                                   (1)

where the two lines started by [ are actually merged with one expanded [ for the Text block with its output. To get rid of the unwanted output, I have to put my curser over the h0 that is in the Text body (not the output h0) and hit "Shift-F5". The output h0 with its equation number disappears.  If there are a number of simple math expressions in a text block, I have to process them one at a time with "Shift-F5". This takes up a lot of time. With earlier Maple versions (~2015 or earlier) I used to fly through Text blocks using the shortcuts "Ctl-R" and "Ctl-T" and these Text blocks produced no output when the worksheet was reexecuted.

Starting with Maple 2016 I could enter math expressions in Text blocks using the shortcuts, but I could not copy and paste  a Text block with inline math expressions without the expressions becoming "live" in the copied block.  Starting with Maple 2017 all my Text boxes with math expressions began executing the math and producing output.

I gave up on Maple 2017 and 2018.  I have finally made the jump from Maple 2016 to Maple 2019, in part, because I finally discovered the "Shift-F5" trick to make math expressions in a Text block inactive.

Does anyone know how to make the default behaviour of Maple with math expressions in a Text block to be "Don't execute the math and produce output in the Text block"?

I would post an actual example worksheet, except I have never been successful whenever I have tried to upload a worksheet. I hope my description above is adequate.

Any help will be greatly appreciated.  Neill Smith

 (1)

what??

## What happened to Normal distribution in Maple 2019...

Earlier smoothly working generation of normal distribution in v. 2019 unexpectedly shows the error:

RandV  := Statistics[RandomVariable](Normal(0, 1));
Statistics[Sample](RandV, 10);

Error, (in p) unable to convert Float(undefined) to an integer

 1 2 3 4 5 6 Page 1 of 6
﻿