## Simple maple trigonometric issue....

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.

## How to convert a table of diffs to D...

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];

 > print(A);

 >

## Table entries with indices that have a certain pat...

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?

## Seperate Real and Imaginary...

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 .

## why limit fails when having two limits at once but...

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);

 > Physics:-Version();

 > 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]);

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);

## How can I check the version of Maple?...

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?

## Status bar: Memory - What memory is displayed...

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.

## Avoiding the "roots of complex number"...

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

## Error, (in anonymous procedure called from depends...

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?

 > interface(version);

 > Physics:-Version();

 > 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;

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

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

## How does one insert unusual Math symbols in a text...

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.

## How can I define a linear transformation?...

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

## Mma to Maple of Monte Carlo Integration code...

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}]```

## how to simplify this simple expression?...

hi , there is a simple expression ,

1D-input code:

3*G*(`&Delta;&gamma;`*H - `&sigma;y`(`&Delta;&gamma;`) + q)/(-q + `&sigma;y`(`&Delta;&gamma;`))^2;

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

hope for the result:

3*G*`&Delta;&gamma;`*H/(q - `&sigma;y`(`&Delta;&gamma;`))^2 - 3*G/(q - `&sigma;y`(`&Delta;&gamma;`));

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

1D-input :

algsubs(3*G*`&Delta;&gamma;`/(q - `&sigma;y`(`&Delta;&gamma;`)) = y, 3*G*`&Delta;&gamma;`*H/(q - `&sigma;y`(`&Delta;&gamma;`))^2 - 3*G/(q - `&sigma;y`(`&Delta;&gamma;`)));

hope for some suggestions . thanks!

## odetest does not validate correct solution for fir...

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;

 > interface(version);

 > Physics:-Version();

 > libname;

 > 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])

 > #we see that odetest think the solution does not verify the IC. But it does
 > IC_eq:=Pi/3=limit(rhs(sol),x=infinity)

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.