Thomas Richard

Mr. Thomas Richard

3255 Reputation

13 Badges

15 years, 104 days
Maplesoft Europe GmbH
Technical professional in industry or government
Aachen, North Rhine-Westphalia, Germany

MaplePrimes Activity


These are answers submitted by Thomas Richard

On a laptop with 20 GB RAM, I'm not getting any error message, but pdsolve gets stuck in triangularizing a system that arises when trying the TWS approach internally (set infolevel[pdsolve]:=5 to obtain that information). So I cancelled that after one hour, and tried a specific (additive) ansatz instead:

restart:

#infolevel[pdsolve]:=5:

pde1 := diff(w(x,y,z),x)+diff(w(x,y,z),y,y)+2*(diff(v(x,y,z),x)-diff(u(x,y,z),y)-2*w(x,y,z)) = diff(w(x,y,z),z,z);

diff(w(x, y, z), x)+diff(diff(w(x, y, z), y), y)+2*(diff(v(x, y, z), x))-2*(diff(u(x, y, z), y))-4*w(x, y, z) = diff(diff(w(x, y, z), z), z)

(1)

pde2 := 3*diff(u(x,y,z),x,x)+2*diff(u(x,y,z),y,y)+2*diff(v(x,y,z),x,y)+2*diff(w(x,y,z),y) = diff(u(x,y,z),z,z);

3*(diff(diff(u(x, y, z), x), x))+2*(diff(diff(u(x, y, z), y), y))+2*(diff(diff(v(x, y, z), x), y))+2*(diff(w(x, y, z), y)) = diff(diff(u(x, y, z), z), z)

(2)

pde3 := 3*diff(v(x,y,z),y,y)+2*diff(v(x,y,z),x,x)+2*diff(u(x,y,z),x,y)-2*diff(w(x,y,z),x) = diff(v(x,y,z),z,z);

3*(diff(diff(v(x, y, z), y), y))+2*(diff(diff(v(x, y, z), x), x))+2*(diff(diff(u(x, y, z), x), y))-2*(diff(w(x, y, z), x)) = diff(diff(v(x, y, z), z), z)

(3)

sys := [pde1,pde2,pde3]:

fcns := [u(x,y,z),v(x,y,z),w(x,y,z)]:

add_sol := pdsolve(sys, fcns, HINT=`+`);

{u(x, y, z) = (1/2)*_C1*x^2+_C2*x+_C3+(1/2)*exp(2^(1/2)*y)*_C17+(1/2)*exp(-2^(1/2)*y)*_C16+(1/2)*(-3*_C1+_C7)*y^2+_C18*y+_C19+(1/2)*_C7*z^2+_C8*z+_C9, v(x, y, z) = (1/4)*exp(2*x)*_C13+(1/2)*(_C10-3*_C4)*x^2+_C14*x+_C15+(1/2)*_C4*y^2+_C5*y+_C6+(1/2)*_C10*z^2+_C11*z+_C12, w(x, y, z) = (1/2)*exp(2*x)*_C13+(-(3/2)*_C4+(1/2)*_C10)*x-(1/2)*2^(1/2)*exp(2^(1/2)*y)*_C17+(1/2)*2^(1/2)*exp(-2^(1/2)*y)*_C16+((3/2)*_C1-(1/2)*_C7)*y+sin(2*z)*_C23+cos(2*z)*_C22+(1/8)*_C10+(1/2)*_C14-(1/2)*_C18-(3/8)*_C4}

(4)

pdetest(add_sol,sys);

[0, 0, 0]

(5)

mult_sol := pdsolve(sys, fcns, HINT=`*`);

Warning,  computation interrupted

 

 

Download PDE-system-mhirnyk.mw

A multiplicative ansatz seems to take longer, or even get stuck again.

Where does this PDE system come from?

First, please make sure you have the latest updates Maple 18.02 and MapleSim 6.4.02.

If the problem persists, you can send your msim file (with the xls file inside, or additionally - see attachment options) to our Tech Support team, e.g. through menu item Help > Technical Support. Please note that MapleSim 6.4 is no longer officially supported, but perhaps the solution is easy. Also note that it's Thanksgiving in Canada today, so there will be a delay.

You can also try to upload your msim file here.

One issue that frequently appears with Excel is international language support and misinterpretation of decimal separators. If you use a decima comma instead, Maple (and thus MapleSim) will complain.

 

The settings you describe are stored in Maple's GUI initialization file. Its location and name depend on the platform. Under Windows it's \AppData\Roaming\Maple\<version>\Maple.ini below your home directory, which is typically C:\Users\<username>. Under Linux (and I guess Mac OS X as well), it's ~/.maple/<version>/maplerc (note that the directory is hidden, due to the leading dot; use "ls -lA" to see it).

First of all, the author writes that he has implemented one such decomposition in Sage, so you could contact him and ask for his code [his e-mail address is given at the end of the paper; his web server linked in the introduction is unreachable]. Perhaps it can be migrated to Maple.

Next, I wonder if it's really useful. I typed the three examples 2.5, 2.9 and 2.10 into Maple, and it has no trouble with iterated univariate PFDs (which are also mentioned in the reference to Stoutemyer's alternative decomposition). For convenience, I used lowercase x,y,z; all results in the paper are confrmed.

restart:

f25:=(x^2*y+x*y^2+x*y+x+y)/(x*y*(x*y+1));

(x^2*y+x*y^2+x*y+x+y)/(x*y*(x*y+1))

(1)

convert(f25,parfrac,x);

1/y+1/x+1/(x*y+1)

(2)

convert(f25,parfrac,y);

1/y+1/x+1/(x*y+1)

(3)

f29:=(x^2*y^2+x^2*y*z+x*y^2*z+2*x*y*z+x*z^2+y*z^2)/(x*y*z*(x*y+z));

(x^2*y^2+x^2*y*z+x*y^2*z+2*x*y*z+x*z^2+y*z^2)/(x*y*z*(x*y+z))

(4)

c29:=convert(f29,parfrac,x);

(y+z)/(y*z)+1/x+1/(x*y+z)

(5)

convert(c29,parfrac,y);

1/z+1/x+1/(x*y+z)+1/y

(6)

convert(c29,parfrac,z);

1/z+1/x+1/(x*y+z)+1/y

(7)

f210:=(2*x^2*y+4*x*y^2+y^3-x^2-3*x*y-y^2)/(x*y*(x+y)*(y-1));

(2*x^2*y+4*x*y^2+y^3-x^2-3*x*y-y^2)/(x*y*(x+y)*(y-1))

(8)

c210:=convert(f210,parfrac,x);

(2*y-1)/(y*(y-1))+1/x+1/(x+y)

(9)

convert(c210,parfrac,y);

1/x+1/(y-1)+1/y+1/(x+y)

(10)

 


Download multivariate-PDF-examples.mw

 

If all sublists in A have length 2, this should be the easiest solution:

B,C := op(ListTools:-Transpose(A));

Sure, it's implemented for arbitrary p and q. You need to supply one list with p "upper" parameters, and one with q "lower" parameters, and the argument. Please see ?hypergeom for the whole story. A 3F2 example that has an elementary representation:

hypergeom([1,b,1],[2,1],z);

simplify(%);  # or simplify(%,hypergeom);

While I'm confident that Carl's answer fully addresses your question, let me please point out that Mathieu equations such as your eq1 are handled by dsolve - so perhaps a trigonometric expansion isn't even necessary? Just a guess.

[I'm currently away from my laptops and PCs, so I cannot run your code before Monday when back in the office.]

I would start with Chapter 15 of the Programming Guide. This can be found interactively in the Help browser's ToC or by entering ?ProgrammingGuide,Chapter15. [Of course, you're not supposed to know that link. Instead, you can simply search for terms like "parallel" etc.]

I wouldn't say it's normal, but I can confirm it. There may be a memory leak in the JVM, I don't know for sure. AFAIK, some memory allocation rules are configurable through java_args in Maple's launch.ini, but I haven't tried it since the Java GUI was introduced many years ago (when memory sizes were much smaller).

My setup is similar to yours: same Maple and OS version, just with 20 GB RAM, and javaw.exe is at 3.3 GB now. But I had more than 50 tabs (up to 10 simultaneously) open in the same Maple session, with long-running calculations and heavy plots, so I wasn't surprised. Machine uptime is close to 27 days now.

The 'foci' option expects a list of two points (i.e. objects of the geometry package), whereas you just provided a list of two lists (with x,y coordinates). These are different data structures. So try this instead:

ellipse(e1, ['foci'=[point(p1,0,1),point(p2,4,1)], 'MajorAxis' = 8],[x,y]);

Most newer packages and their commands have a Compatibility section in their help page. Enter ?PolynomialTools,AnnihilatingPolynomial to see a detailed example, or ?CurveFitting,Lowess for a very short one.

For others, you can always ask here on MaplePrimes - though there is no guaranteed answer, of course.

It's possible to determine the parameter values, but the output (warning message and plot) will tell you that your model function is not really a good fit to your experimental data:

with(Statistics):
f := 1-(8*a*b+6*c*d/(b*k*x))/(2*a*b+c*b*(1/(b*k*x)));
X := Vector([seq(200+s,s=0..90,10)]):
xmin := min(X): xmax := max(X):
Y := Vector([.4172, .3030, .4668, .3317, .1276, .1303, .1733, .1451, .3466, .4125]):
nlfit := NonlinearFit(f, X, Y, x, output='parametervalues');
assign(nlfit);
a, b, c, d, k;
with(plots):
points := pointplot([X,Y]):
func := plot(f, x=xmin..xmax):
display(points,func);

Even a polynomial fit like f := a*x^4+b*x^3+c*x^2+d*x+e will do better. If you agree, try the PolynomialFit command instead and experiment with the degree.

In Maple 2016, the Worksheet package contains an undocumented command WorksheetToMapleText which takes an mw file and emits its "textual" content as centered strings. Not (yet) precisely what you asked for, but could be a start for your own post-processing. To view its implementation, use the eval or print command (after setting interface(verboseproc=2)) or showstat as usual.

I do not know the plans for the next version, but I would guess this command will be fully functional and documented then.

interface(worksheetdir);

Note: this feature is available since Maple 18.

I confirm tomleslie's observation that pdsolve gets stuck here; I cancelled it after lunch break (about 1h).

However, you can still find special types (or forms) of solutions. Just to give you a start:

infolevel[pdsolve]:=1: # optionally
pde[1] := diff(u(x, t), t)-DD*diff(u(x, t), x, x) = alpha*u(x, t)*(1-v(x, t));
pde[2] := diff(v(x, t), t)-EE*diff(v(x, t), x, x) = beta*v(x, t)*(1-u(x, t));
pdesys := [pde[1],pde[2]]:
with(PDEtools):

TWSols := TWSolutions(pdesys,parameters=[DD,EE,alpha,beta]);
numelems([TWSols]);
map(pdetest,[TWSols],pdesys);

SimSols := SimilaritySolutions(pdesys);
numelems([SimSols]);
map(pdetest,[SimSols],pdesys);

I've stopped here, but there are several other specialized commands in PDEtools, as you can see from its export list. You may have to play with command options to expand or to restrict their output.

Note: I replaced constant factor D by DD, as the former is the differential operator in Maple. For cosmetic reasons, I then replaced E by EE as well.

First 17 18 19 20 21 22 23 Last Page 19 of 43