Thomas Richard

Mr. Thomas Richard

3255 Reputation

13 Badges

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

MaplePrimes Activity


These are answers submitted by Thomas Richard

Does this return the sequence of coefficients you need?

with(DEtools):
dcoeffs(lhs(ODE),L(x,y));

The dcoeffs command is also available in the PDEtools package (in case you get puzzled by its help page).

I suppose you are talking about the context menu, as opposed to a command. The interactive method has to use some defaults, so the border is included. The programmatic approach lets you override that:

currentdir(kernelopts(homedir));
plotsetup(ps,plotoutput="cosine.eps",plotoptions='noborder');
plot(cos);
plotsetup('default'); # switch back plot output to screen

I'm afraid this is worth a FAQ...

convert(sin(x),FormalPowerSeries);

convert(sin(x),FPS); # for short

Please look up ?convert,FPS for more information.

Here's another one, meant to be a starting point for your experiments:

with(plottools):
with(plots):
b := 3:
s1 := sector([0,0], b+0..b+1, 0..Pi, color="blue"):
s2 := sector([0,0], b+1..b+2, 0..Pi, color="green"):
s3 := sector([0,0], b+2..b+3, 0..Pi, color="yellow"):
s4 := sector([0,0], b+3..b+4, 0..Pi, color="red"):
display([s1,s2,s3,s4], axes=none, scaling=constrained);

See ?plottools,getdata. Here's a 3D example:

p3d := plot3d(exp(x)*cos(y),x=0..1,y=0..Pi):
points := plottools:-getdata(p3d)[3];
plots:-matrixplot(points); # optical check, optional

For exporting to a file, you can use writedata or ExportMatrix, e.g..

I don't see any examples attached, but please note that CodeGeneration supports Python 3 (see ?CodeGeneration,PythonDetails). So if that's what you mean by "syntax is incorrect", you will have to adapt the code to that old version 2.7.

There are numerous ways, and I'm sure many readers will come up with useful suggestions.

The approach in MathApps,PascalsTriangle is based on plots[textplot]; check its startup code.

The error message comes from the return statement: it expects an expression or a sequence of expressions. So moving the assignment before that statement will be sufficient.

You should also use the long form LinearAlgebra:-Eigenvectors(Hamil, output=['values,'vectors'].

Other readers may have more observations and comments.

Interesting PDE problem! Three observations (trivial, half-way, non-trivial):

1. You can omit some parentheses, just for better readability:

PDE := diff(f(x__1, x__2, p__1, p__2), x__1)*p__1/m - diff(f(x__1, x__2, p__1, p__2), p__1)*(2*k*x__1-k*x__2) + diff(f(x__1, x__2, p__1, p__2), x__2)*p__2/m - diff(f(x__1, x__2, p__1, p__2), p__2)*(-k*x__1+2*k*x__2) = 0;

2. Maple confirms the validity of the solution you provided:

given := f(x__1,x__2,p__1,p__2) = c*(p__1^2/m+p__2^2/m+4*p__1*p__2/m+6*k*x__1*x__2);
pdetest(given,PDE);

3. Since your PDE is of first order, I tried the characteristic strip method (see ?PDEtools,charstrip):

sys := splitstrip(PDE, f(x__1, x__2, p__1, p__2));
dsol := map(u -> dsolve( u, indets(u,Function)), sys);

From here on, I think you can investigate further. I'm busy today, sorry.

I guess you mean style sets. Please see ?worksheet,documenting,styles for a start.

Maple's CodeGeneration package will translate user procedures and expressions to a variety of (currently 10) target languages. So you need to supply further code to form a complete program that can be compiled to an executable file. Of course, higher Maple functionality that cannot be mapped to the target language will be lost, and CodeGeneration will issue a warning message then.

For interactive Maple documents, you can obtain the equivalent of an executable file when using the Maple Player. This has also been discussed several times here on MaplePrimes, so please search for that topic.

MapleSim generates C code from any simulation model. This code can easily be completed to a standalone program, but again, producing an executable file is done by a compiler (and linker) which is not part of MapleSim. The executable is "standalone" in the sense that it does not require any runtime libraries from MapleSim, and no royalties (license fees) apply. Big advantage over some competitors...

You could try the instructions in our FAQ, but I'm not aware of any other customers using an Intel compute stick.

Maple 15 appeared way before Windows 8.1, so this combination has never been tested.

There is a nice package available in the Application Center at http://www.maplesoft.com/applications/view.aspx?SID=3606. I haven't installed it in a while, but you might find it useful.

One way to get started is by running built-in examples and then modifying them. For instance, enter ?appsexamples to find a list of some applications. And then click on "Quality Control of Paint Process". That should be a good fit.

[It can also be found systematically, but that's longer to describe here. You're not expected to know the shortcut.]

If you prefer learning all the steps in a more structured way, start e.g. by following the Maple Portal (for Engineers, ideally). Just enter ?portal to open its main document.

I agree with tomleslie, but wanted to add one hint. Since you supplied initial conditions, as opposed to boundary conditions, you can compute a series approximation (not sure if that qualifies as "applying any technique"):


Order := 16:

sol := dsolve([eq1,bcs],y(x),'series');
odetest(sol,[eq1,bcs],'series'); # optional check

The coefficients are decreasing slowly, so a small radius of convergence is expected,  as seen in tomleslie's odeplot. It doesn't explain the warning message, though.

Check out ?dsolve,series for more information.

First 21 22 23 24 25 26 27 Last Page 23 of 43