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

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

## 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.

## Trouble with AI Formula Search...

Every last query I make in the AI Formula Assistant returns this message...

This happens even when I use a basic canned query shown in use-case examples (e.g., surface area, sphere).

I have accepted the Terms of Use.  Is there some other setting I need to enable? Thanks.

## Something weird with dsolve and Heaviside function...

For the following program using dsolve to solved a differential equation with a sum of exponential inputs, the time required has a huge dependence on subtle difference in paramters.

For example, if Cl := 0.32, calculation time is 1.4 sec.    If Cl := 0.33,  calculation time is 39 sec.

Also, calculation time seems to have huge dependence  on whether or not I truncate M

Can someone please explain what is going on?

restart;
st := time();
N := 4;

T := 5.0/60;
M := 6905;
dose := t -> M*sum(Heaviside(t - 24*k/N)*exp((-t + 24*k/N)/T), k = 0 .. 2*N - 1);
Cl := 0.32;
deq := diff(C(t), t) = dose(t) - Cl*C(t);
sol := t -> rhs(dsolve({deq, C(0) = 0}));
p := plot(sol(t), t = 0 .. 48);
time() - st;
1.360

## Block Maple access to ChatGPT during exams...

Hi,

I am the administrator of Maple in my school, and all the students use Maple in part of their exams. Is it possible  to block the access to ChatGPT thru eg. the firewall or otherwise during exams.

The reason for this question is that the students must have access to some internet sources during exams, but definately not CharGPT.

Kind regards

Per Kirkegaard

## solve the equation of the odometric model...

Hello, I try to solve the equations of the odometric model with the Maple 2024 but I have not the answers as with the hands, can you help me to verify it ?

dsolve(diff(phi(t), t) = tan(10*t)/5)

dsolve(diff(x(t), t) = V*cos(ln(1 + tan(10*t)^2)/100))

dsolve(diff(y(t), t) = V*sin(ln(1 + tan(10*t)^2)/100))

Best regards, Edern Ollivier.

## How to make ODESteps use the new nicer looking con...

I noticed that Student:-ODEs:-ODESteps does not use the newer subscripted constant of integrations for solution of odes which looks much nicer.

Is there a way to make it use same constant of integrations as dsolve() does? Compare

This is on a worksheet using typesetting level extended. Worksheet is attached

 > restart

 > interface(version);

 > Physics:-Version();

 > #to make Maple use the new constant of integrations. Is this still needed in Maple 2024? dsolve(diff(y(x),x\$9)=1,arbitraryconstants=subscripted): pdsolve(diff(psi(x,t),x\$9)=0,arbitraryfunctions=subscripted):
 > ode := diff(y(x), x\$2) + 2*y(x) = 0; Student:-ODEs:-ODESteps(ode,y(x));

 > #compare to this output dsolve(ode,y(x));

## Disable Maple AI Formula Assistant...

Is there a way to disable Maples AI Formula Assistant? This could be relevant when using Maple for a test.

## Return only two specific values from a procedure...

I have a proceure that returns 7 values. I cac get it to return ang single specific value ousing e.g [2] to get the second.
Or a range[3..6] for the third to sixth.

Is there a way to get specific seperated values e.g [1] and[[6]. The procedure is burried in a package so it is difficult to post.

## Why Maple gives solution to Euler ode which has no...

This second order (Euler type) ode has no solution for the given two initial conditions. but Maple gives solution with one unresolved constant of integration.

```ode:=x^2*diff(y(x),x\$2)-2*y(x)=0;
ic:=y(0)=4,D(y)(0)=-1;

sol_no_IC:=dsolve(ode)
```

The IC's are given at x=0 as a trick to see what Maple will do. We see that at x=0 there is division by zero. So no solution exist for these IC's. But see what happens

```sol_with_IC:=dsolve([ode,ic])
```

It seems Maple simply threw away the part of the solution it could not handle due to the x=0 and just returned the rest.

```odetest(sol_with_IC,[ode,ic])
```

The correct answer should have been the NULL solution (i.e. no solution).

What Am I missing here? Why does Maple do this? Should Maple have returned such a solution?

Maple 2024 on windows 10.

update:

Reported to Maplesoft support.

update:

Here is another example ode. This is first order ode. Maple gives a solution that does not satisfy the initial condition also. I wish I can understand how Maple comes up with these solutions since when I solve these by hand I see it is not possible to satisfy the IC, hence no solution exist.

 > interface(version);

 > Physics:-Version();

 > restart;

 > ode:=diff(y(x),x)+y(x)/x=x^2; ic:=y(0)=a;

 > dsolve(ode)

 > sol:=dsolve([ode,ic])

 > odetest(sol,[ode,ic])

 > Student:-ODEs:-ODESteps([ode,ic])

Error, (in Student:-ODEs:-applyICO1) numeric exception: division by zero

## With Units Changes Display of Function...

I have a simple tank design worksheet that calculates dimensions of a tank that I need to build to hold a given amount of liquid.  My question is this - when I include a "with(Units);" statement, the volume function gets rendered in operator prefix notation.  Why is this?  Is there a setting to prevent this from happening?  Thanks.

Without "with(Units);"...

With "with(Units);"...

I've included a worksheet that shows the function both with and without the inclusion of "with(Units);".

Tank_Design_Calculation_-_Units_Question_(v00).mw

## How to "show" this inequality?...

I have two expressions, wo_theta and with_theta, which depend on multiple variables.

I would need your help to:

1. Verify, as formally as possible, that wo_theta > with_theta always, i.e., for any value of theta different from zero (and regardless of the values taken up by the other variables)
2. Show the above in a way that is easy and immediate to interpret (perhaps using some type of plot?)

In other words, I want to verify that as soon as I introduce any theta in my expression such expression becomes smaller:

 > restart;
 > local gamma;
 (1)
 > assume(0 < gamma, 0 < nu__02, 0 < nu__01, 0 <= sigma__v, delta__1::real, delta__2::real, delta__3::real, theta::real); interface(showassumed=0);
 (2)
 > wo_theta := X__3*(-X__3*lambda__3 - delta__3*lambda__3 + DEV) + X__2*(-X__2*lambda__2 - delta__2*lambda__2 - nu__02) + X__1*(-X__1*lambda__1 - delta__1*lambda__1 - nu__01) + X__2*(nu__02 + DEV/2) + X__1*(nu__01 + DEV/2) - gamma*X__2^2*sigma__v^2/4 - gamma*X__1^2*sigma__v^2/4 + gamma*X__2*X__1*sigma__v^2/2;
 (3)
 > with_theta := X__3*(-X__3*lambda__3 - theta*lambda__3 - delta__3*lambda__3 + DEV) + X__2*(-X__2*lambda__2 + theta*lambda__2 - delta__2*lambda__2 - nu__02) + X__1*(-X__1*lambda__1 + theta*lambda__1 - delta__1*lambda__1 - nu__01) + X__2*(nu__02 + DEV/2) + X__1*(nu__01 + DEV/2) - gamma*X__2^2*sigma__v^2/4 - gamma*X__1^2*sigma__v^2/4 + gamma*X__2*X__1*sigma__v^2/2 + theta*(lambda__1*(X__1 + delta__1 - theta) + lambda__2*(X__2 + delta__2 - theta) - lambda__3*(X__3 + delta__3 + theta));
 (4)
 > collect(with_theta, theta);
 (5)
 > solve(wo_theta > with_theta, theta) assuming 0 < gamma, 0 < nu__02, 0 < nu__01, 0 < sigma__v, delta__1::real, delta__2::real, delta__3::real, theta::real;
 > solve(with_theta < wo_theta, theta);
 > difference_term := (-lambda__1 - lambda__2 - lambda__3)*theta^2 + (X__1*lambda__1 + X__2*lambda__2 - X__3*lambda__3 + lambda__1*(X__1 + delta__1) + lambda__2*(X__2 + delta__2) - lambda__3*(X__3 + delta__3))*theta;
 (6)
 > # I would expect such difference_term in theta to be always < 0, i.e., for any theta different from 0) # (Note that lambda_1, lambda_2, and lambda_3 are always > 0, while theta, the three X and the three delta can be positive or negative. In other words, it suffices to show that the linear term in theta is always negative...) solve(difference_term<0);
 (7)

## Eigenvector output flipping ...

I have a problem with the order  of the Eigenvalues and Vectors flipping. It is a bit random. I only found it trying to understand why a procedure sometimes rotated a conic one way and  then the other. This a really causing a quite a problem, I have only tried this in Maple 2024 so far. I have included screen shots to prove the effect.

 > restart
 >
 > with(LinearAlgebra):
 >
 > M:=Matrix([[0,1],[1,0]]);
 > a,b:=Eigenvectors(M)  ;#click here and press enter again possible a 4 times, output can filp
 >
 (1)
 > a
 (2)
 > b
 (3)
 >