nm

8552 Reputation

19 Badges

12 years, 352 days

MaplePrimes Activity


These are replies submitted by nm

@vv 

Thanks. Will try your new method on my large file and see if it works for all cases. It will take a day or so to finish building.

 

@vv 

I am afraid this does not work for all cases.  Here is an example

restart;
S:=[seq(_C||k=c[k], k=0..10)]:
sol:=dsolve(t^2*diff(diff(y(t),t),t)-t*diff(y(t),t)+5*y(t) = 0,y(t));
sort(subs(S,sol));  

You see _C1 and _C2 were at the front as given by Maple, which is what I wanted, but when applying the subs, the c[1] and c[2]  now they no longer at the front.

Compare to using alias, where now it just happend that no sort is needed (but this is for this example only), but I am running this in a program, and can't look at screen to decide what to do. So I apply sort all the time.

restart;
alias(seq(c[k]=_C||k,k=0..10)):
sol:=dsolve(t^2*diff(diff(y(t),t),t)-t*diff(y(t),t)+5*y(t) = 0,y(t), singsol=all);

So your method works on some cases, but not for all cases.

I need something that works all the time, to make _C1 and _C2 always at the front, but using c[1] and c[2] instead to make the Latex looks better.

This problem is not as easy as it looks.

Sorry, but I have to keep looking for another solution which works for all cases.

I think it is a problem with the mapleprime server now.

I just now tried to upload same worksheet  I uploaded  in this question https://www.mapleprimes.com/questions/231212-Why-Maple-Refuses-To-Change-Location

And got error. But it worked OK 2-3 days ago.

It seems you just happened to try when the server was having hard time for some reason. I've seen this upload error before also, but not much lately.    But at this moment it is back again.

Someone at Mapleprime IT should look into this.

 

it works for me on 2020.2 on windows.  It could be a version issue since you are not using 2020.2

restart;
Z := n -> op~(2, { allvalues(solve(LegendreP(n,x))) } );
Digits:=10:
Z(17):
numelems(%);
	
Z(18):
numelems(%);

Digits:=15:
Z(18):
numelems(%);

What is the reason please? 

it could be a bug. You could try with latest Maple version and see if this is fixed.

Actually a simpler final result than the one you showed as your desired is

    

@Carl Love 

You are right that the basic version is simple to code, something probably most of us have done before in first year at school.

But Matlab's trapz handles other options and 2D and higher dimensions. It is  about 70 lines long (with 30 of these documenation). Its listing is shown here 

I was not asking how to code one, just was wondering why Maple does not have a similar version a build-in, that takes input as just pure data instead of an actual function as the case now.

Since it is simple to implement, may be Maple should have it in one of its packages to avoid having to invent the wheel each time one needs it.

 

 

 

 

 

@wanderson 

"Do you know some references out of Maple? Articles, books.."

Sorry, I do not understand the question exactly.

May be if you could explain more what is it you are looking for, someone can answer it.  

@wanderson 

Can you give me some references??

A good way to find what methods Maple used to solve an ode or pde is to turn on the infolevel for that command before calling the solver. For your system, it gives

restart; 
infolevel[pdsolve]:=4;
pde1:= diff(C(x,t),t)=d* diff(C(x,t),x$2)- k*epsilon(x)*C(x,t);
ode:= diff(epsilon(x),x)=-mu*k*epsilon(x)*C(x,t);
pdsolve([pde1,ode],[C(x,t),epsilon(x)]) assuming x>a,x<=b,t>0

Then  looking at the trace output printed will show what methods/algorithm were used. 

......
First set of solution methods (general or quasi general solution)
   -> trying differential factorization for linear PDEs ...
   -> trying methods for PDEs "missing the dependent variable" ...
   -> trying missing independent variables
   -> trying the Laplace's method
   -> trying a first integral mapping the PDE into and ODE plus parameters
.....

For an example, let's take a look at a simpler and more standard diffusion/heat PDE on 1D on finite domain since we know that the most common analytical method, learned from text books is the seperation of variables which generate a series solution. And this is indeed what Maple uses:

restart; 
infolevel[pdsolve]:=4;
pde := diff(T(x,t), t) = k*diff(T(x,t), x$2);
bc  := T(0,t) = 0, T(L,t) = 0;
ic  := T(x,0) = f(x);
pdsolve([pde, ic, bc],T(x,t)) assuming k>0,L>0,t>0,x>0

Looking at the trace printed on screen it says

....
* trying method "Series" for 2nd order PDEs
....
      HINT = *
      Trying methods for second order linear PDEs
....
<- method "Series" for 2nd order PDEs successful

So it uses separation of variables (also called the series method, since the output is series)

So you can use this to find more how Maple solves pde's and ode's and what methods/algorithms it uses.

 

@wanderson 

But the second equation ist Not a pde!

Yes I know. I just called the variable pde2 as I was writing. But will correct it now by calling the variable ode instead as follows

restart; 
pde1:= diff(C(x,t),t)=d* diff(C(x,t),x$2)- k*epsilon(x)*C(x,t);
ode:= diff(epsilon(x),x)=-mu*k*epsilon(x)*C(x,t);
pdsolve([pde1,ode],[C(x,t),epsilon(x)]) assuming x>a,x<=b,t>0

pdsolve can be used on system of equations, if one of them is pde. Like this

ode:=diff(y(x),x)=x;
pde:=diff(v(x,t),t)=v(x,t)+y(x);
pdsolve([ode,pde],[v(x,t),y(x)])

btw, the title of your own question is called

                      "coupled partial differential equations"

Which numerical method the maple use?

There are no numerical methods at all used here. It is an analytical solution. Numerical methods can't be used on this problem since it is missing initial/boundary conditions and contains parameters which have no numerical values.

 

@BrettKnoss 

Why did you add C:\Program Files\Maple 2020\bin.X86_64_WINDOWS  to TEXINPUTS environment variable? It should be the folder that contains the style files. On my PC they are in C:\Program Files\Maple 2020\etc

Search for this folder on your PC if there are somewhere else. 

@Carl Love 

It is possible to use Latex for both HTML and PDF final output, I do this all the time. My whole web site is written in Latex.

To generate HTML from latex, TeXLives comes with tex4ht, which is a program written many years ago by a Professor who unfortunately passed away too young.

This program is called tex4ht and is still in active development and part of texlive, and converts Latex to HTML.

Current version of tex4ht, also supports mathjax, which means the Latex is displayed in the browser using mathjax, which gives a very pretty display of Latex/Math on the web page, much better than anything out there.

Maplesoft should use Latex for its HTML help pages on the net, to make them readable as compared to what they look now, half of them one can't even read the math on them, since it is all mangled up and missing many items.

I also have no idea why OP is generating Latex and adding those "#mt" and "#mn" stuff in there. This makes no sense. I never used these "#" things, since all my output from Maple ends up as Latex.

 

@Preben Alsholm 

I put new video. it might depends if you do this from Fresh Maple or not. You might need to try couple of time, as the new video shows. I do not understand what is going on myself, but you can see the solution changes.

 

@tomleslie 

FYI, I added a movie also. 

I am using windows 10 pro, 64 bit.

@dharr 

The "x" there does not look the same as the "x" I get from Latex itself (default font, computer modern). Which is (in math mode $x$)

Is it possible to get your example to look like the above? 

 

 

 

 

First 24 25 26 27 28 29 30 Last Page 26 of 71