MaplePrimes Questions

>FunctionAdvisor(Zeta)

Then go to the plot section. I would like to see the commands that were used (complexplot3d I guess) to plot the first Zeta Riemann function in 3-d. Usually, you go to the cell where you se the output that you are interested in. Then you right-click and choose properties of the Array. Then you check the "Show input". Then you click OK and you are suppose to see the input that generate the 3-d plot of the Riemann Zeta Function.

But it doesn't happen. So maybe I am doing something wrong. Any idea?

Thank you in advance for your help.

On donne une ellipse rapportée à ses axes x^2/a^2+y^2/b^2-1=0 et une droite (D) qui rencontre cette
courbe en 2 points A et B. 
On considère un cercle variable passant parles points A et B et on demande le lieu géométrique des points de rencontre des tangentes communes au cercle et à l'ellipse.
restart;
with(plots);
with(VectorCalculus);
a := 5;
b := 3;
ellipse_eq := (x, y) -> x^2/a^2 + y^2/b^2 - 1;
m := 1;
c := -2;
line_eq := (x, y) -> y - m*x - c;
intersections := solve({line_eq(x, y) = 0, ellipse_eq(x, y) = 0}, {x, y}, explicit);
A := intersections[1];
B := intersections[2];
A := [VectorCalculus:-`+`(VectorCalculus:-`*`(25, 17^VectorCalculus:-`-`(1)), VectorCalculus:-`*`(VectorCalculus:-`*`(15, sqrt(30)), 34^VectorCalculus:-`-`(1))), VectorCalculus:-`+`(VectorCalculus:-`-`(VectorCalculus:-`*`(9, 17^VectorCalculus:-`-`(1))), VectorCalculus:-`*`(VectorCalculus:-`*`(15, sqrt(30)), 34^VectorCalculus:-`-`(1)))];
B := [VectorCalculus:-`+`(VectorCalculus:-`*`(25, 17^VectorCalculus:-`-`(1)), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(15, sqrt(30)), 34^VectorCalculus:-`-`(1)))), VectorCalculus:-`+`(VectorCalculus:-`-`(VectorCalculus:-`*`(9, 17^VectorCalculus:-`-`(1))), VectorCalculus:-`-`(VectorCalculus:-`*`(VectorCalculus:-`*`(15, sqrt(30)), 34^VectorCalculus:-`-`(1))))];
center_x := VectorCalculus:-`*`(VectorCalculus:-`+`(A[1], B[1]), 2^VectorCalculus:-`-`(1));
center_y := VectorCalculus:-`*`(VectorCalculus:-`+`(A[2], B[2]), 2^VectorCalculus:-`-`(1));
radius := VectorCalculus:-`*`(sqrt(VectorCalculus:-`+`(VectorCalculus:-`+`(A[1], VectorCalculus:-`-`(B[1]))^2, VectorCalculus:-`+`(A[2], VectorCalculus:-`-`(B[2]))^2)), 2^VectorCalculus:-`-`(1));
circle_eq := (x, y) -> (x - center_x)^2 + (y - center_y)^2 - radius^2;
L := (x1, y1, x2, y2, lambda1, lambda2) -> (x1 - x2)^2 + (y1 - y2)^2 + lambda1*ellipse_eq(x1, y1) + lambda2*circle_eq(x2, y2);
eq1 := diff(L(x1, y1, x2, y2, lambda1, lambda2), x1);
eq2 := diff(L(x1, y1, x2, y2, lambda1, lambda2), y1);
eq3 := diff(L(x1, y1, x2, y2, lambda1, lambda2), x2);
eq4 := diff(L(x1, y1, x2, y2, lambda1, lambda2), y2);
eq5 := ellipse_eq(x1, y1);
eq6 := circle_eq(x2, y2);
sols := solve({eq1, eq2, eq3, eq4, eq5, eq6}, {lambda1, lambda2, x1, x2, y1, y2}, explicit);
sols;
lieu_geometrique := [seq([sols[i][1], sols[i][2]], i = 1 .. nops(sols))];
plot(lieu_geometrique, style = point, symbol = cross, color = red, title = "Lieu géométrique des points de rencontre");
Ce code m'a été donné en partie par l'intelligence artificielle (Mistral), mais il se plante. Pourriez-vous corriger les erreurs. Merci.

evalindets API says 

             evalindets( expr, atype, transformer, rest )

Where the transformer will be applied on any indents of atype.

But I want to be able to do the opposit, i.e. 

             evalindets( expr, except_this_atype, transformer, rest )

ie. apply the transformer on everything except those of atype.

Here is a concrete example and what I tried.

I get result of apply inverse Fourier transform which can have some terms in it which can not be evaluated. Like this

Y:=(s+1)/s^2+Int(sqrt(s^2),s);
expr:=inttrans:-invlaplace(Y,s,t);

Now I want to evaluate the above at some specific value of t, say t=0 but I do not want change/touch any "t" inside invlaplace(....) function. 

If I just do 

eval(expr,t=0)

So I tried evalindets with flat option and used for atype anything, then inside the transformer, check if op(0,X) is invlaplace (i.e the head), and if so, skip it. But it did not work

Y:=(s+1)/s^2+Int(sqrt(s^2),s);
expr:=inttrans:-invlaplace(Y,s,t);
evalindets[flat](expr,anything,X->`if`( evalb(op(0,X)='invlaplace'),X,eval(X,t=0)));
evalindets[flat](expr,anything,X->`if`( op(0,X)='invlaplace',X,eval(X,t=0)));



Currently what I do to make this to work, is to first replace the "t" inside invlaplace by another unused symbol, then do the eval to change t, then replace the symbol back to t.

Like this, and this works:

Y:=(s+1)/s^2+Int(sqrt(s^2),s);
expr:=inttrans:-invlaplace(Y,s,t);
expr:=evalindets[flat](expr,'specfunc(anything,invlaplace)',X->eval(X,t=T));
expr:=eval(expr,t=0);
expr:=eval(expr,T=t);

Is it possible to do the above using one call to evalindets?  Why did the check I had the above using `if`(...) not work?

It will be really useful if evalindets had option NOT atype,  in addition of just atype.

i.e. tell it to do the transformation on everything except the type given.

Maple 2024.2

 

I am trying to animate images generated in a do loop using display and insequence. I get an output but there is no flipping of the image even while I see the frames count flip through the frames. What am I doing wrong? See attached code. Thanks!

Why_cant_I_animate_still_images_like_this.mw

This is about delayed input after executing this file Campo_Médio_spin_7_2_-_Forum_optimize_02.mw

from annother question dealing with very large physics expressions (containing about 100000 exponential functions).

The GUI shows but when I place the cursor in an inputline and type, characters are sometimes displayed with a huge delay (about 20 seconds). This is from time to time, i.e. not always. All on Windows 10, 64 Gb memory and 4 Gb graphic card memory.

Can someone reproduce this?

Has anybody experienced the same (kernel with large expressions & GUI not responsive)?

Anything that I can test or try?

(I had a similar question about file size but this time the file size is small 150 kB and no big plots are made.

Only the kernel has to deal with the large expression. Output displayed on the GUI is negligible.)

Hey guys, 

in the attached file you can see my problem. Since Maple was not able to calculate my set with 8 equations, 8 variables and 13 inequalities I had to split in into two steps. Here you can see how I try to take one solutions of what I got with solve onto 8 equations with 8 variables and to solve this together with my inequalities. It never was a problem before. So ow I get a weird error I dont understand.

restart; inequalities := {0 < k, 0 < m, 0 < s, 0 < x, 0 < y, 0 < n+(p-1)*s, 0 < (m*y-1)*n+(m*x-m+1)*(1-p), 0 < (m*x-m-s+1)*p+m*y*(s-n), 1 < x+y, k < 1, m < 1, s < t, t < 1}; solve(`union`({k = (x*(1-sqrt(x))+sqrt(x)-2*x)/((x^2-3*x+1)*x), m = (sqrt(x)+x)/(x-1), n = (sqrt(x)+x)/(x-1), p = (-1-sqrt(x))/(x-1), s = (-1-sqrt(x))/(x-1), t = (2*x*(1-sqrt(x))+1+sqrt(x)-5*x)/(x^2-3*x+1), y = 1-sqrt(x)}, inequalities)); inequalities := {0 < k, 0 < m, 0 < s, 0 < x, 0 < y, 0 < n+(p-1)*s, 0 < (m*y-1)*n+(m*x-m+1)*(1-p), 0 < (m*x-m-s+1)*p+m*y*(s-n), 1 < x+y, k < 1, m < 1, s < t, t < 1}

Error, (in unknown) invalid input: SolveTools:-Inequality expects its 1st argument, eqns, to be of type {list, set}({`<`, `<=`, `=`}), but received [p < 1, -p < 0, And(2*argument((p-1)/p) <= Pi,-Pi < 2*argument((p-1)/p))]

 

restart; solve(`union`({k = (x*(1-sqrt(x))+sqrt(x)-2*x)/((x^2-3*x+1)*x), m = (sqrt(x)+x)/(x-1), n = (sqrt(x)+x)/(x-1), p = (-1-sqrt(x))/(x-1), s = (-1-sqrt(x))/(x-1), t = (2*x*(1-sqrt(x))+1+sqrt(x)-5*x)/(x^2-3*x+1), y = 1-sqrt(x)}, {0 < x, 0 < y}))

{k = p^3/(p^3-2*p+1), m = -p+1, n = -p+1, s = p, t = (3*p-2)*p/(p^2+p-1), x = (p^2-2*p+1)/p^2, y = 1-((p^2-2*p+1)/p^2)^(1/2), 3/2+(1/2)*5^(1/2) < p}, {k = p^3/(p^3-2*p+1), m = -p+1, n = -p+1, s = p, t = (3*p-2)*p/(p^2+p-1), x = (p^2-2*p+1)/p^2, y = 1-((p^2-2*p+1)/p^2)^(1/2), 1 < p, p < 3/2+(1/2)*5^(1/2)}, {k = p^3/(p^3-2*p+1), m = -p+1, n = -p+1, s = p, t = (3*p-2)*p/(p^2+p-1), x = (p^2-2*p+1)/p^2, y = 1-((p^2-2*p+1)/p^2)^(1/2), 1/2 < p, p < (1/2)*5^(1/2)-1/2}, {k = p^3/(p^3-2*p+1), m = -p+1, n = -p+1, s = p, t = (3*p-2)*p/(p^2+p-1), x = (p^2-2*p+1)/p^2, y = 1-((p^2-2*p+1)/p^2)^(1/2), p < 1, (1/2)*5^(1/2)-1/2 < p}

(1)

restart; solve(`union`({k = (x*(1-sqrt(x))+sqrt(x)-2*x)/((x^2-3*x+1)*x), m = (sqrt(x)+x)/(x-1), n = (sqrt(x)+x)/(x-1), p = (-1-sqrt(x))/(x-1), s = (-1-sqrt(x))/(x-1), t = (2*x*(1-sqrt(x))+1+sqrt(x)-5*x)/(x^2-3*x+1), y = 1-sqrt(x)}, {0 < s, 0 < x, 0 < y}))

Error, (in unknown) invalid input: SolveTools:-Inequality expects its 1st argument, eqns, to be of type {list, set}({`<`, `<=`, `=`}), but received [-p < 0, And(2*argument((p-1)/p) <= Pi,-Pi < 2*argument((p-1)/p))]

 
 

NULL

So my question is why does this error occur? And what does it mean? the "but received..." argument in the error makes no sense to me. Why does it happen when I add 0<s but 0<x,0<y is okay?

Thank you in advance

Download Why_this_error.mw

When giving invlaplace an input with an Inert integral (becuase it can not be evaluated), it sometimes return 
              Error, (in depends) malformed integral

But sometimes it returns the inverse Laplace of the unresolved integral, which is the expected result.

In both cases, it should just return  inverse Laplace of the unresolved integral.

Below is worksheet showing such case.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.2, Windows 10, October 29 2024 Build ID 1872373`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1836 and is the same as the version installed in this computer, created 2024, December 2, 10:11 hours Pacific Time.`

restart;

Y:=int(sqrt(s)*exp(-s)/(s+1), s);
inttrans:-invlaplace(Y,s,t)

int(s^(1/2)*exp(-s)/(s+1), s)

Error, (in depends) malformed integral

restart;

Y:=int(sqrt(cos(s^2)), s);
inttrans:-invlaplace(Y,s,t)

int(cos(s^2)^(1/2), s)

invlaplace(int(cos(s^2)^(1/2), s), s, t)

 

 

Download malformed_intergal_dec_7_2024.mw

Just reported to Maple support also.

The determinant of a 10*10 matrix is solved, but the result is very long, like the numerical way to solve, but did not find the appropriate method, the Analytic solution is very slow, calculated for 5 hours has not been calculated.

question128.mw

Solved a "simple" dynamics problem involving the law of cosines... etc.  Part of the solution involves selecting the positive root from the resulting 2nd order equation in x(t)- below.  

eq1 := (r1 + r2)^2 = r1^2 + x(t)^2 - 2*r1*x(t)*cos(theta(t))  (law of cosines)

eq2:=diff(eq1,t)

eq3 := subs(diff(x(t), t) = v, diff(theta(t), t) = omega, eq2)  (remove xdot and theta dot)

assume(0 < x(t));
assume(0 < t);
assume(0 < theta(t) and theta(t) < 2*Pi);

xx := solve(eq3, v)  (creates an relationship between v, theta and x)

     xx := -r1*x(t~)*omega*sin(theta(t~))/(-cos(theta(t~))*r1 + x(t~))

Not clear what this t~ notation means?

when I solve eq1 above for x(t) there are two roots.  I select the positve root, but receive this warning...

eqx := solve(eq1, x(t))[1]

Warning, solve may be ignoring assumptions on the input variables.
        eqx := cos(theta(t))*r1 + sqrt(cos(theta(t))^2*r1^2 + 2*r1*r2 + r2^2)

How can I correct or address the warning message?

Finally,  to piece together the solution I perform this step

v := subs(x(t) = eqx, xx)

The result has a fairly obvious "simplification", but using "simplify" and "combine" only makes it worse...  Is there a combination of commands to accomplish a simplification.

Here is the entirety of the Maple...

restart;
with(Typesetting);
Settings(typesetdot = true);

eq1 := (r1 + r2)^2 = r1^2 + x(t)^2 - 2*r1*x(t)*cos(theta(t));
eq2 := diff(eq1, t);
eq3 := subs(diff(x(t), t) = v, diff(theta(t), t) = omega, eq2);
assume(0 < x(t));
assume(0 < t);
assume(0 < theta(t) and theta(t) < 2*Pi);
xx := solve(eq3, v);
eqx := solve(eq1, x(t))[1];
v := subs(x(t) = eqx, xx);

examine the result for v... easy to see the "simpificaion"... but not sure how to manipulate Maple to accomplish this...

JD

Hi!

I am working on a chemical engineering problem and trying to find a value (Ua) that does not result in a reactor temperature (T) exceeding 398.15 K.

I am employing a system of ode's, secondary functions, variables, starting conditions etc., and the dsolve function to determine these parameters.

Some values are given or calculated, UA is not. So for now I have just been guessing at the value (needed to preform the dsolve initially) and plotting to see relations to T and other parameters. My teacher has directed us to employ this trial and error apporach, which I find time consuming.

There is of course a smarter, more time efficient way of doing this and I was wondering how one could implement this? Moreover, how does one find the values of all the other variables at this Ua value? Is there a one-liner?

I tried implementing a loop to check for max UA values <= 398.15, but was not able to implement it..

Any help would be kindly appreciated.

FindingExtractingvaluesdsolvewithspecificconditions.mw

So my file got corrupted, i have no clue how to fix it. The file i was able to restore from OneDrive is 2 days old and is missing most of the information, i only have the backup files for the later version. Is there someone with expertice who can help me out? 

Can anyone explain me the reason of the last result?
Thanks in advance

restart

kernelopts(version)

`Maple 2015.2, APPLE UNIVERSAL OSX, Dec 20 2015, Build ID 1097895`

(1)

a/n^b;
den := denom(%);
print(cat(`_`$50));

3/n^2;
den := denom(%);
print(cat(`_`$50));

1.23/n^1.65;
den := denom(%);
num := numer(%%);

a/n^b

 

n^b

 

__________________________________________________

 

3/n^2

 

n^2

 

__________________________________________________

 

1.23/n^1.65

 

1

 

1.23/n^1.65

(2)
 

 

Download What-does-happen-here.mw

Lb1 represents a number of lengths, but I don't want to use a number to replace it now, but directly using eval, the variable in it becomes Lb1, unlike the following values show, how to write it like a number?

Hi:

I want to copy some Maple output elsewhere in the form of Maple input.

Usually, if I highlight the output expression I can copy it with CTLR-C, and paste it elsewhere where it appears as Maple input.

Just like you'd expect and just like you'd want.

But if the expression is fairly long and complicated (it covers two lines on my screent this time), the highlight insists on including the > symbol on the next line and when I paste, all I get is the Maple output that I started with.

If I write the output expression name to a temporary file and read it in another worksheet, the same thing happens when I ask for the name of the output expression - it appears as Maple output. But I need the expression in the form of Maple input so I can modify it.

All this makes me think that there is a limit to the size of the copy buffer, but I can't find anywhere to change that.

Does anyone know how to do this very simple task which usually works reliably for small expressions?

Thank you.

Hi everyone!

I'm double checking a result from maple.  When I substitute maple's solution into the differential equation, left side does no equal right side.  Does anyone have some insight into this?

thanks

the maple file is below

is_this_correct.mw

First 49 50 51 52 53 54 55 Last Page 51 of 2425