MaplePrimes Questions

Through the years I basically had to work with the fact that Maple prefers to express results in terms on Cos^2(x) and not Sin^2(x).

With older Maple versions there was never a workaround by means of a command that would convert an expression in terms of sin^2(x) if Maple expressed it as cos^2x.

Is there any way in the newer Maple versions to convert output to be expressed rather as sin(x).

It becomes a bit old, to always substitute the identitity manually to convert.

Any easy way  for this in new versions.

I have a table indexed as A[i][j,k],  Each entry is an expression involving diff which I want to convert to but convert(A,D) doesn't work. Any suggestions on how to do that?

restart;

for i from 1 to 2 do
  for j from 1 to 2 do
    for k from 1 to 2 do
      A[i][j,k] := diff(u[i](x[1],x[2]), x[j], x[k]);
    end do
  end do;
end do;

A[1][1,1];

diff(diff(u[1](x[1], x[2]), x[1]), x[1])

print(A);

A

 
 

Download convert-table.mw

 

I am trying to find the minimum values of a table, but not of all of its indices, just some that comply to a certain pattern.

The minimum of the values of a table are found by using min(entries(atable)).

If the indices of atable are "a1", "a2", "b1", "b2", I would like to just have the ones starting with "a".

Can be done by a loop, but is there a easier way?

I any trying to seperate the real and imaginary components but they are mixed up inside and outside a square root.

Their seems to be a problem displaying the worksheet.

restart



expand((a+I*b)*(a-I*b))
(a+I*b)+(a-I*b)
# z = x *Iy    I need to seperate out solution to [x,y] & [x,-y]
#https://math.stackexchange.com/questions/44391/foci-of-a-general-conic-equation
eq := T*z^2 - (R + S*I)*z +G-K + H*I
sol:=solve(eq,z)
expand(sol[1]*sol[2])=a^2+b^2
simplify(sol[1]+sol[2]=2*a)
simplify(sol[1]-sol[2]=2*b)

Maple Worksheet - Error

Failed to load the worksheet /maplenet/convert/2024-04-20_Q_Seperate_Real_&_Imaginary.mw .

Download 2024-04-20_Q_Seperate_Real_&_Imaginary.mw

Is it wrong to call limit like this

limit(expr,[y = y0,x=x0]);

vs

limit(expr,y = y0);
limit(%,x=x0);

The first one gives internal Maple error.  Worksheet attached. I would have expected both to work the same.

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1727 and is the same as the version installed in this computer, created 2024, April 17, 19:33 hours Pacific Time.`

kernelopts('assertlevel'=2):

expr:=3/2*(y-1)^(2/3)-3/2*x^2-c__1 = 0;
y0:=-7;
x0:=3;
limit(expr,[y = y0,x=x0]);
 

(3/2)*(y-1)^(2/3)-(3/2)*x^2-c__1 = 0

-7

3

Error, (in limit/multi/ldegree1) assertion failed

expr:=3/2*(y-1)^(2/3)-3/2*x^2-c__1 = 0;
y0:=-7;
x0:=3;
limit(expr,y = y0);
limit(%,x=x0);

(3/2)*(y-1)^(2/3)-(3/2)*x^2-c__1 = 0

-7

3

-3+(3*I)*3^(1/2)-(3/2)*x^2-c__1 = 0

-33/2+(3*I)*3^(1/2)-c__1 = 0

 

 

Download limit_internal_error_maple_2024.mw

Hi all, I have two versions Maple 2016 and Maple 2018. I'm writing a program, but some functions only run on Maple 2018, so I'm trying to find a way to check the version of Maple. How can I do this?

I have noticed a substantial difference between the memory Maple displays per worksheet

and what the task manager (red arrow) indicates. After kernel restart it looks like this

What Maple displays does not seem to correlate with the physical memory used/allocated.

What is actually displayed and how can we make use of this information?

Also: Is the displayed Time the total process time or the time the Gui waits for the server to reply? Hard to tell.

 

Hello,

I'm encountering an issue with the "roots of complex number" message while running my Maple code. Maple seems unable to solve this problem for me.

I would greatly appreciate any ideas or suggestions that could help me resolve this error.

Vib-code.mw

I still see these Maple internal errors in Maple 2024.

Now calling odetest.

The problem is that it is not possible to catch them.

Any suggestion what to do and what causes it?

11196

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1727 and is the same as the version installed in this computer, created 2024, April 17, 19:33 hours Pacific Time.`

sol:=y(x) = (exp(RootOf(-sin(x)*tanh(1/2*_Z+1/2*c__1)^2+sin(x)+exp(_Z)))+sin(x))/sin(x);
ode:=diff(y(x),x)-cot(x)*(y(x)^(1/2)-y(x)) = 0;

y(x) = (exp(RootOf(-sin(x)*tanh((1/2)*_Z+(1/2)*c__1)^2+sin(x)+exp(_Z)))+sin(x))/sin(x)

diff(y(x), x)-cot(x)*(y(x)^(1/2)-y(x)) = 0

try
   odetest(sol,ode,y(x));
catch:
   print("cought error ");
end try;

Error, (in anonymous procedure called from depends) too many levels of recursion

 

 

Download too_many_levels_of_recursion_calling_odetest_maple_2024.mw

Hello:

I have created a simple plot and labelled a line as follows

Lbl:=plots[textplot]([600,-Pi*floor(R)*ln(R)-0.01,typeset(-pi*floor(r)*ln(r)),font=[Helvitica,bold,10]],labels=[T," "]):

where R is a number, so the label appears near where I want it to be:

But part of the formula is floor(r) and I can't make that appear as the 2D mathematical symbol for floor(r) in the typeset;

If I make the typeset part of an axis label or a legend, I can cut and paste the math2 expression for floor(r) just before I export the plot and that works, but how do I do that for a textplot that is sitting in the middle of a plot?

Thank you.

Dear All,

I want to define a linear transformation called T, an operator on the variable x. This transformation is such that, for example, the transformation T(alpha__1*x^2*y+alpha__2*x^4*t+alpha__3*t*y) returns alpha__1*y*T(x^2)+alpha__2*t*T(x^4)+alpha__3*t*y*T(1).

Can anyone help me in this matter? At this stage of the work, I don't have a precise definition of this linear transformation.

T(alpha__1*x^2*y+alpha__2*x^4*t+alpha__3*t*y)=alpha__1*y*T(x^2)+alpha__2*t*T(x^4)+alpha__3*t*y*T(1);

Best wishes

Hopefully, this is a question relating to Mathematica, which I find virtually unreadable, and the Statistics package, which I am minimally familiar with, that someone can answer quickly.

Hence, could someone translate the following Mathematica code into Maple code? (The MmaTranslator failed at the 2nd line.)

func[x_] := 1/(1 + Sinh[2*x]*(Log[x])^2);

Distrib[x_, average_, var_] :=   PDF[NormalDistribution[average, var], 1.1*x - 0.1];
n = 10;
RV = RandomVariate[TruncatedDistribution[{0.8, 3}, NormalDistribution[1, 0.399]], n];
Int = 1/n Total[func[RV]/Distrib[RV, 1, 0.399]]*Integrate[Distrib[x, 1, 0.399], {x, 0.8, 3}]

hi , there is a simple expression ,

1D-input code: 

3*G*(`Δγ`*H - `σy`(`Δγ`) + q)/(-q + `σy`(`Δγ`))^2;

 

and I want to simplify it like below ,but failed  ,

 

hope for the result:

3*G*`Δγ`*H/(q - `σy`(`Δγ`))^2 - 3*G/(q - `σy`(`Δγ`));

then  I'd like to use algsubs , but again  a error occurs.

1D-input :

algsubs(3*G*`Δγ`/(q - `σy`(`Δγ`)) = y, 3*G*`Δγ`*H/(q - `σy`(`Δγ`))^2 - 3*G/(q - `σy`(`Δγ`)));

 

hope for some suggestions . thanks!

I think I found another clitch in odetest.

dsolve gives correct solution to this first order ode with IC. But odetest does not verify that the solution is satisfied for the IC part, but only for the ode itself. 

Below worksheet confirms the solution is also valid for the IC.   So why odetest does not give 0 for the IC part?

``

restart;

19644

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1727. The version installed in this computer is 1725 created 2024, April 15, 17:29 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib\`

libname;

"C:\Users\Owner\maple\toolbox\2024\Physics Updates\lib", "C:\Program Files\Maple 2024\lib"

ode:=x^2*diff(y(x),x)*cos(y(x))+1=0;
ic:=y(infinity)=Pi/3; #16/3*Pi;
sol:=dsolve([ode,ic]);
odetest(sol,[ode,ic])

x^2*(diff(y(x), x))*cos(y(x))+1 = 0

y(infinity) = (1/3)*Pi

y(x) = arcsin((1/2)*(3^(1/2)*x+2)/x)

[0, (1/3)*Pi]

#we see that odetest think the solution does not verify the IC. But it does

IC_eq:=Pi/3=limit(rhs(sol),x=infinity)

(1/3)*Pi = (1/3)*Pi

Download odetest_does_not_verfiy_correct_solution_maple_2024_april_18_2024.mw

I think what odetest did is not use limit when plugging in the values. That is why.

If we do not use limit, this is what happens:

IC_eq:=Pi/3=eval(rhs(sol),x=infinity)

And this explains the odetest output. It should have used limit.

ps. just in case also reported to Maplesoft support.

Hi, I am trying to illustrate the concept of solid areas, and I'm wondering if there's a way to easily develop them (representing each of their faces in two dimensions on the same plane) using Maple? Thank you for your help

SolidesDév.mw

First 13 14 15 16 17 18 19 Last Page 15 of 2329