nm

5399 Reputation

17 Badges

8 years, 224 days

MaplePrimes Activity


These are replies submitted by nm

@Carl Love 

Sorry, I thought it is a reply to my comment as it was below it, that is I was confused by your reply.

 

 

 

@Carl Love 

I know it does not specify the number of terms. Where did I say it does?

I was simply asking for an example showing the issue.

 

Could you show an example, where order is different from powers on (x-x0)?  since normal use it is the same (difference by 1)

series(exp(x),x=x0,3)  

gives

I do not know why in this forum specially, folks do not bother taking little extra time to give an example to illustrate the issue they are having. An example always helps clarify the question.

A picture is worth a thousand words.

 

 

@Kitonum 

Thanks. I use [] all the time to index, but for some reason I used () here without noticing. 

But why did () work here for the column case and not the row case?

 

How could we reduce the size without losing any quality?

could you show/illustrate one such example?

pdetest is a name of a Maple command.   ?pdetest.

Not a good idea to name your own function with same name.

is it really hard to make a small minimal example of your table including code that generated it?  This will make it more clear what kind of table you are talking about.

@Kitonum 

Thanks for the workarounds. I know I can do the above ofcourse. But  this means I have to duplicate a very long string, which I do not want to do. Also, I could have more than one `if`(...)  

Here is an example

str:="A";
x:=10;
if x=10 then
   str:=cat(str,"some very long string here"," it was 10 ",
         "another very long string");
   x:=11;
else
   str:=cat(str,"some very long string here"," it was not 10 ",
         "another very long string");
   x:=9;
fi;

I use these string to build long Latex expressions.   Currently, I just build the string without the assignments, if any, and after that I check again outside, using standard if then else.   But it is awakward, since I duplicate the same check in two places.

 

@vv 

What exactly is the purpose of [] at the end of sort(...)[] command? I've seen it before, but I can't find any explanation of it in help as I can't find where this is explained.

I know   `%+`(sort(..)) does not work. It has to be `%+`(sort(...)[ ]) 

Is the whole thing a map like operation?

I am using Maple 2020.2

 

@robertocooper 

epspdf and pdfcrop are not Latex commands. These are commands to run from the terminal.   On Linux or on windows 10 under the Linux subsystems (Ubuntu). These are free/open source programs which can be easily installed.

it will be better to just type the differential equation here with any IC/BC instead of having one to read all that to figure which ODE you want solved.  I could not figure which ODE needs to be solved.

I know this form does not allow Latex, which is a pity for a forum supposed to be used for asking questions about math. Stackexchange supports Latex.

@jat741 

I do not use maple numeric solver much. But Maple can only solve PDE's numerically with 2 independent variable, while your PDE has 3 (r,z,t)

restart;
a := 35.5*0.0254: a:=convert(a,rational);
b := 36.5*0.0254: b:=convert(b,rational);
L := 0.0254*30*12: L:=convert(L,rational);
alpha := 0.000026972: alpha :=convert(alpha,rational);
Psi_s := 0.0440: Psi_s := convert(Psi_s,rational);
flux_b := 5.1/12: flux_b := convert(flux_b,rational);

h := 0:
the_laplacian_in_cylinderical :=VectorCalculus:-Laplacian( u(r,z,t), 'cylindrical'[r,phi,z] );
pde := diff(u(r, z, t), t) = alpha*the_laplacian_in_cylinderical + h;

bc:= u(r,L,t)=Psi_s, 
     -alpha*(D[2](u)(r,L,t))=0,
     -alpha*(D[1](u)(a,z,t))=0,
     -alpha*(D[1](u)(b,z,t))=flux_b;

ic:=  u(r, z, 0) = Psi_s;

#infolevel[pdsolve]:=5;
sol := pdsolve(pde,{bc,ic},u(r, z, t),numeric,time=t) ;

Error, (in pdsolve/numeric/process_PDEs) can only numerically solve PDE with two independent variables, got {r, t, z}
 

May be someone who knows more Maple's numerical solvers might have workaround.

 

 

@jat741 

One way might be to convert the solution to a function of x,t, and k (since k is not specified). Then take derivative w.r.t x and evaluate at x=1.    You could also plot it (for given k). You'd need to replace infinity by some finite value to make this work.   15 is good enough. The larger, the more accurate. 

restart;
h:=(x,t)->0;
pde := diff(u(x,t),t) = k*diff(u(x,t),x$2)+h(x,t);
bc  := u(0,t) = 10,u(1,t) = 20;
ic  := u(x,0) = 60*x -50*x^2+10;
sol:=pdsolve([pde,bc,ic],u(x,t));
sol:=subs(infinity=15,sol);
sol:=unapply(rhs(sol),[x,t,k]);
plot(eval(diff(sol(x,t,1),x),x=1),t=0..5,labels=["time","u'_x at x=1"])

Or if you just want numerical values

restart;
h:=(x,t)->0;
pde := diff(u(x,t),t) = k*diff(u(x,t),x$2)+h(x,t);
bc  := u(0,t) = 10,u(1,t) = 20;
ic  := u(x,0) = 60*x -50*x^2+10;
sol:=pdsolve([pde,bc,ic],u(x,t));
sol:=subs(infinity=15,sol);
sol:=unapply(rhs(sol),[x,t,k]);

seq( [t,evalf(value(eval(diff(sol(x,t,1),x),x=1)))],t=1..10)

gives

[1, 9.997903738], [2, 9.999999892], [3, 10.], [4, 10.], [5, 10.], [6, 10.], [7, 10.], [8, 10.], [9, 10.], [10, 10.]

so at t=10, u'_x at x=1 is 10, which is what the plot also shows.

There could be better/shorter ways to do the above ofcourse. 

 

@mmcdara 

thanks. updated. I did not notice that h(x,t)=0.

@ecterrab 

Thanks for the information. Maple sometimes makes videos to show things, like Maple youtube channel

It will be useful to have one Video showing what you just explain there. Will be easier to follow that way. 

My code is all in a library. (.mla) and all source is in .mpl files. I do not use code in worksheet, other than to open a worksheet in order to call the functions I want in the .mla from the worksheet. 

I am trying to see if I can reproduce what you described. I do not know how to use emacs. Last time I used it, was many many years ago now. 

 

 

1 2 3 4 5 6 7 Last Page 1 of 50