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

Try adding axiscoordinates=cartesian and maybe axes=boxed. The former is documented under ?polarplot, and the latter under ?plot,options.

Things like this happen when you have extended your desktop to a 2nd screen (external monitor or beamer) but switched that off or disconnected it now, without telling Windows so. To move such a "hidden" application window, go to its mini representation above the taskbar (as seen in your screenshot), right-click to invoke the context menu, then select Move. You can then move the window to your 1st (main) screen, usually by holding down the left or right arrow keys. Note that this may require a few seconds, depending on window position and screen resolution, so don't release the arrow key too soon.

It's independent of any particular application such as MapleSim.

It would help if you post your actual commands, not just the output.

For a start, the identity can be obtained like this:

assume(a::real,x::real);
ls := sum((-1)^n/n*sin(Pi*n/a*x),n=1..infinity);
e := evalc(ls);
c := convert(e,expln);
rs := simplify(c,symbolic);

I have made the following changes, but did not measure their effeciency:

1. Load only the necessary packages. You need VectorCalculus for the Del command, and that's it.

2. Replace array by Array in F and G declarations.

3. Specify the successful method for the nested integrals in the last loop:

eqnl1x := eqnl1x+int(int(temp2, x = 0 .. a, method = FTOC), y = 0 .. b, method = FTOC)

(This was be found out by setting infolevel[IntegrationTools]:=5 before.)
You also might want to lprint(k) to watch the loop progressing...

With moderate memory requirements, I'm getting a result for eqnl1x after 20 minutes or so, on a very loaded computer. I'm sure this can be improved further. The error message on p3 also vanishes.

To make your program platform-independent, avoid absolute pathnames whenever possible. E.g. I mostly rely on kernelopts(homedir) as the root of the relevant directory tree, and either set currentdir(kernelopts(homedir)) or construct paths like cat(kernelopts(homedir),"/some/more/stuff") to be used in subsequent commands.

As others already said, you can use forward slashes in Maple on Windows as well. I wish all applications (and eventually Windows itself) would adopt that. By the way, for copying Windows paths into Maple, a colleague of mine recommended "Path Copy Copy". It adds a helpful "Path Copy > Copy to Unix Path" item (besides other features) to the context menu of Windows Explorer.

If you still need to recognize the OS, call kernelopts(system) or kernelopts(platform), depending on the exact purpose. The latter call simply returns the OS "family".

Here's a quick solution; no time to check (it's 6pm here, need to leave the office):

ellcart := x^2/20+y^2/13=1;
ellpolar := subs([x=r1*cos(t),y=r2*sin(t)],ellcart);
par := solve(identity(ellpolar,t),[r1,r2]);
sol := par[1]; # pick 1st pair
assign(sol);
V := Vector([r1*cos(t),r2*sin(t)]);
peri := VectorCalculus:-ArcLength(V,t=0..2*Pi);
evalf(peri);

I hope it's correct - or at least a start. ;-)

I'm afraid nobody can reproduce that. I've tried lots of input variations, but to no avail.

What version are you runing?

I cannot reproduce the trailing zeros in your screenshot, neither in Maple 12.02 nor in current 17.02. Probably a configuration issue on your system, hence not a bug.

Mark (highlight) that number, then right-click to open the context menu. Select "Copy Special > Copy full precision", then paste into Notepad.

Unfortunately, your code example is not being displayed, which could be a MaplePrimes issue. Please try to upload your worksheet using the green up-arrow button. That will help us understand question 1.
For question 2, the answer is

currentdir("plotFILES");

Note that this outputs the previous currentdir setting - don't let that confuse you.

Beginning with Maple 16, you can also set the current directory interactively by clicking on the link in the status bar (lower right corner of the Maple window).

The natural way would be to define a function f, as opposed to an expression, then call f  with swapped arguments:

f := (x1,x2,x3) -> x1 * x2 * x3^4;

f(x3,x2,x1);

sort(%); # optionally

EDIT: If you prefer an expression f, use a list of substitutions: subs([x1=x3,x3=x1],f);

1. The Share library was made for Maple V, i.e. in the 1990s, so you have to use the indexing notation for the long form, i.e. package[command]. From Maple 6 on, new packages should be implemented as modules, and that's where the package:-command notation is possible (and recommended). Please see ?:- or ?colondash for background info. Hence the error message "`share` does not evaluate to a module" that you got.

2. A special case is that IntSolve is both a subpackage of the share package, and a command therein. This explains why share[IntSolve](eq1,p(x)) returns unevaluated and why IntSolve[IntSolve](eq1,p(x)) works.

3. I don't know much about IntSolve (just installed the Share library to check this during the lunch break), but I guess it only returns approximate solutions. The intsolve solution to eq1 is correct, as you can easily check by plugging it in for p(x).

Interesting question. I don't have a purely symbolic answer, but you might try this as a workaround:

expr := log[3+sqrt(8)](3-x)-log[17-6*sqrt(8)](4*x^2+20*x+25)+log[3-sqrt(8)](x^2+x-2);
plot(expr,x=-5..3);

Let's try numerically, from right to left (just my choice). Note that I had to supply starting points in the fsolve calls (guessed from the plot) and to increase Digits a bit for identify to succeed at ns3.

Digits := 12:
fsolve(expr=0,x=2.5);
ns1 := identify(%);
fsolve(expr=0,x=-2.2);
ns2 := identify(%);
fsolve(expr=0,x=-3);
ns3 := identify(%);

Does that help?

That's not possible in general, but there are some options:

1. CodeGeneration package if the result can be mapped to target languages C, Fortran, Java, C#, VisualBasic. Matlab is also supported, but probably not an option in this context.

2. Maple Player (see here); please note that this does not run arbitrary (traditional) code, but only displays its results. For interaction (including calculations), use Embedded Components, many of which are very similar to Maplet elements.

3. Depending on what the usage scenario is, you might want to consider full Maple installations for the target machines. E.g. if not all of them need to run Maple simultaneously, a small network license may be the best solution. We also offer classroom licenses for student education where the price per seat is really low. If you want to distribute computational load across a network, take a look at the Grid Computing Toolbox. Just contact our sales representatives if needed.

There are multiplications signs missing, at least in 1D aka Maple notation. If I add them manually and call the result lt, I get

lt := ((-1+lambda*(lambda*k[2]*alpha[2]+alpha[1]*(k[2]*lambda^2-2*k[2]-2))^2)*k[1]*(lambda*k[2]*alpha[2]+alpha[1]*(k[2]*lambda^2-2*k[2]-2))+(-lambda*lambda*(lambda*alpha[1]*k[1]+alpha[2]*(k[1]*lambda^2-2*k[1]-2))^2+lambda)*k[2]*(lambda*alpha[1]*k[1]+alpha[2]*(k[1]*lambda^2-2*k[1]-2))-k[1]*(-alpha[1]+lambda*alpha[2])*lambda*(2+5*k[2])^2+lambda^5*alpha[2]*k[1]*k[2]-alpha[1]*k[1]*lambda^4*k[2]-2*lambda^3*alpha[2]*k[2]+2*alpha[1]*k[2]*lambda^2+(4*alpha[2]*(1+k[2])*k[1]+4*alpha[2]+4*k[2]*alpha[2]+2)*lambda-4*alpha[1]*(1+k[2])*k[1]-4*alpha[1]-4*alpha[1]*k[2]-2)*(-(lambda*(lambda*k[2]*alpha[2]+alpha[1]*(k[2]*lambda^2-2*k[2]-2))-1)*(lambda*(lambda*k[2]*alpha[2]+alpha[1]*(k[2]*lambda^2-2*k[2]-2))+1)*(-1+k[1]*lambda^2-k[1])*k[1]*(lambda*k[2]*alpha[2]+alpha[1]*(k[2]*lambda^2-2*k[2]-2))+(-lambda*lambda*(lambda*alpha[1]*k[1]+alpha[2]*(k[1]*lambda^2-2*k[1]-2))^2+lambda)*k[2]*(lambda*alpha[1]*k[1]+alpha[2]*(k[1]*lambda^2-2*k[1]-2))-k[1]*(-alpha[1]+lambda*alpha[2])*lambda*(2+5*k[2])^2+lambda^5*alpha[2]*k[1]*k[2]-alpha[1]*k[1]*lambda^4*k[2]-2*lambda^3*alpha[2]*k[2]+(2*k[1]+2*alpha[1]*k[2])*lambda^2+(4*alpha[2]*(1+k[2])*k[1]+4*alpha[2]+4*k[2]*alpha[2]+2)*lambda-(4*(1+k[1]))*(alpha[1]+alpha[1]*k[2]+1/2));

Note that I omitted the trivial factor x here.

Now flt := factor(lt) yields the factorization of this multivariate polynomial, but it's longer than your original expression lt. So that's probably not what you want. See Markiyan's answer instead, and apply it to lt.

First 29 30 31 32 33 34 35 Last Page 31 of 43