Maple 2024 Questions and Posts

These are Posts and Questions associated with the product, Maple 2024

If there any way to make text  parallel to a line in textplot3d.

display(line([1,2,3],[4,5,-2],linestyle=longdash),
        point([2.5,3.5,0.5]),
        textplot3d([2.5,3.5,0.5,"not aligned"]))

Is one not supposed to make _Z local variable?  If not, then how to insure the global _Z do not have some value assigned to it?

In this example below, I build some integral. I used local _Z for upport limit. But now Maple generate internal error.

If I do not declare _Z as local, and leave it global, then no error is generated.

But if I also declare _Z inside the proc as global _Z, then the error also goes away.

So is one always supposed to use _Z as global? 

The strange thing _Z is protected, so I cant assign to it value from global space. Message says Try declaring `local _Z`; see ?protect for details. but when I do that, I still get an error. 

So is the bottom line here is that one should not declare _Z local to a proc, and just assume it is always global symbol that has no assigned value to it, and that will always be safe to do?  I do not assign value to _Z inside my proc. Just wanted to use it for upper limit, as symbol.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

foo:=proc()
 local _Z;
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

foo()

Error, (in RootOf) expression independent of, _Z

boo:=proc()
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

boo();

-RootOf(Intat(x^3/(H^3*tau^4-tau*x^3+x^3), tau = _Z)-(Int(-x, x))+C1)*H/x

boo2:=proc()
 global _Z;
 local F,G,H,n;
 F:=x;G:=x;G:=x;n:=4;
 -RootOf(Intat(F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)/(-
         tau*F^(-n-1)*H^(-2*n+1)*(-G*F*n*H)^n*n^(-n)+F^(-n-1)*H^(-2*n+1)*(-G*F
         *n*H)^n*n^(-n)+tau^n),tau = _Z)-Int(-G,x)+C1)/G*H;
end proc:

boo2()

-RootOf(Intat(x^3/(H^3*tau^4-tau*x^3+x^3), tau = _Z)-(Int(-x, x))+C1)*H/x

_Z:=5;

Error, attempting to assign to `_Z` which is protected.  Try declaring `local _Z`; see ?protect for details.

local _Z;
foo();

Warning, A new binding for the name `_Z` has been created. The global instance of this name is still accessible using the :- prefix, :-`_Z`.  See ?protect for details.

_Z

Error, (in RootOf) expression independent of, _Z

 

 

Download using_Z_inside_proc_august_28_2024.mw

For me this result is suspicious. What do you think? 

This ode diff(y(x),x) = f*y(x)^4+g*y(x)+h; is clearly quadrature, since I did not tell Maple that f,g,h depend on x. So this can be solved by just integration. But when asking odeadvisor if it is Chini, it says yes. When asking it what type it is, now it says it is quadrature.

Am I missing something here? I was expecting [NONE] when asking it if it is Chini.

Yes, the ode has the form of Chini, which is   y'=f(x)*y^n + g(x)*y + h(x), where n=4 here. But if f,g,h do not depend on x, then this is now just quadrature. Right? Calling it Chini is little misleading I think.

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1796 and is the same as the version installed in this computer, created 2024, August 29, 14:22 hours Pacific Time.`

libname;

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

restart;

ode:=diff(y(x),x) = f*y(x)^4+g*y(x)+h;
DEtools:-odeadvisor(ode,y(x),[Chini]);

diff(y(x), x) = f*y(x)^4+g*y(x)+h

[_Chini]

DEtools:-odeadvisor(ode,y(x))

[_quadrature]

dsolve(ode,y(x),[quadrature]);

x-Intat(1/(_a^4*f+_a*g+h), _a = y(x))-c__1 = 0

dsolve(ode,y(x),[Chini]);

y(x) = -RootOf(Intat(g^4/(_a^4*f*h^3-_a*g^4+g^4), _a = _Z)+g*x+c__1)*h/g

 

 

Download question_on_advisor_august_28_2024.mw

Notice another problem in this solutions. If g=0, then the Chini solution gives divison by zero now, while the quadrature solution still works.

In my Maple 2020, I noticed my program got stuck (overnight so let's say for at least 8 hours) on factorization of relatively small integer, so I tried the command standalone:

ifactor(630743190664091077)

and it just froze. For comparsion I tried other SW and programming libraries and basically all of them had the answer instantly. Also looking at the Maple's methods, if I force pollard or lenstra, it also gets the answer instantly. If my understanding is correct, it gets stuck on the method 'morrbril' which is part of the default mix (I tried also mpqs and it gave FAIL, but at least instantly). 

Is that something that still happens by default in newer versions? Seems to me if it gets stuck on 18 decimal digit integer, maybe it's not the best default method...

Why Maple can not do this basic combining of two terms? What do  I need to do to help Maple do it? Am I not using the correct command?

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1795 and is the same as the version installed in this computer, created 2024, August 28, 23:14 hours Pacific Time.`

e:=B^2/(4*(k^n)^(2/3)) - (k^n)^(1/3)*x;

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e);

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,symbolic)

(1/4)*B^2*k^(-(2/3)*n)-k^((1/3)*n)*x

combine(e,power)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,radical)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e,radical,symbolic)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

combine(e) assuming positive;

(1/4)*B^2*k^(-(2/3)*n)-k^((1/3)*n)*x

combine(e,abs)

(1/4)*B^2/(k^n)^(2/3)-(k^n)^(1/3)*x

 

 

Download how_to_combine_august_28_2024.mw

For reference, using another software, this is what it gives

SimpleMarsBlyProcedure.mw

Hello Orbital Mechanics and astrodynamics designers of Maple Primes! I am trying to fly to Mars and enter into orbit around it! I know there are a few of you out there that have thought about doing that! Think of all the great mathematicians who have "dabbled" with orbits and astrodynamics! Anyway, here is my problem: I have a simple keplerian model for doing a flyby around Mars and I have a simple model for Reaction Control Thrusters (RCS) to help put the spacecraft into orbit around Mars.  The first thruster burn happens as the spacecraft enters Mars' Sphere Of Influence (SOI) when it is less than 577000 km away and that burn is needed.  I do that with a piecewise continous function with the conditions set up to fire the thrusters.  But in that same piecewise continous function, I have a 2nd thruster firing with the times called out to fire again.  But this time I want to fire the thruster at periapse (P) in order to go into orbit around Mars.  I believe that the Rosenbrock and/or RKF45 are not responding to the 2nd conditions in the piecewise function I have set up for the thruster firing times.  I have to fire the thruster at periapse and I know that time I reach the periapse point.  Also, in my Maple file you will see that I can "cant" the spacecraft to better control the direction of my burns.  

The problem I am encountering seems to be more about the piecewise functions with multiple conditions and expressions.  Please take a look at my Maple file and see if any of you Orbital Mechanics and/or astrodynamicsts familar with Maple can see what I am doing wrong here.  You don't have to be a astrodyamicist per se, just perhaps you have run across this problem of piecewise functions in dsolve with method = rosenbrock or RKF45. 

Thank you. 

Writng the Pde wave function solution in a textbook form ?
golfvergelijking_oplossing_gebruiken_om_integraaluisom_te_halen_voorbeeld.mw

Hi all guys, it is simple equation, I wanna get the expression of w=()^(1/4) which consists zg & fg. I use solve command but fails, could you please help me?

NULL

p := (1/24)*z*g[u]+(1/24)*f*g[z]-(1/144000)*w^4*(f*g[z]+z*g[u])

(1/24)*z*g[u]+(1/24)*f*g[z]-(1/144000)*w^4*(f*g[z]+z*g[u])

(1)

solve(p = 0, w)

2*375^(1/4), (2*I)*375^(1/4), -2*375^(1/4), -(2*I)*375^(1/4)

(2)

NULL

Download solve_an_equation.mw

Hi dear mapleprime users, i have a problem in a change of varibales if the following ode. i want to use "r=R*rs,u(r)=h*u(R*rs)" variable changes in ode, how can i do that, R is a constant. tnx for the help

restart;with(Student[ODEs]):

y := (1 + diff(u(r), r))*diff(u(r), r, r) + (1 + vs*u(r)/r + (1 - vs)/2*diff(u(r), r))*diff(u(r), r)/r - (1 + (1 + vs)/(2*r)*u(r))*u(r)/r^2

(1+diff(u(r), r))*(diff(diff(u(r), r), r))+(1+vs*u(r)/r+(1/2)*(1-vs)*(diff(u(r), r)))*(diff(u(r), r))/r-(1+(1/2)*(1+vs)*u(r)/r)*u(r)/r^2

(1)

constants := constants, R:

subs(r=R*rs,u(r)=h*u(R*rs),y) ;convert(%,D)

(1+diff(u(R*rs), R*rs))*(diff(diff(u(R*rs), R*rs), R*rs))+(1+vs*u(R*rs)/(R*rs)+(1/2)*(1-vs)*(diff(u(R*rs), R*rs)))*(diff(u(R*rs), R*rs))/(R*rs)-(1+(1/2)*(1+vs)*u(R*rs)/(R*rs))*u(R*rs)/(R^2*rs^2)

 

Error, invalid input: diff received R*rs, which is not valid for its 2nd argument

 
 

 

Download change_of_variables.mw

I sort of remember there is a special syntax for setting initial condition for an ode derivative as    y'(a)=b, where and are symbols. I forgot what it is, everything I try gives error. (I thought eval was used to work for this, but can't get it to work now).

Any one knows how to set this IC?   For an example, given this ode y''(x)+y'(x)+y(x)=0 I want to solve it with the IC as   y'(a)=b where has no numerical value. Just a symbol.

For an example, using another software, it is done as follows

ClearAll[x,y,a,b];
ode=y''[x]+y'[x]+y[x]==0;
DSolve[{ode,y'[a]==b},y[x],x]

Below is my attempts in Maple. I tried eval, subs, and the normal D(y)(a)=b but none of these works when is symbol. 

I looked at help and all examples I saw use constants, as in D(y)(0)=value. 

Iam sure this is possible to do in Maple, but I forgot how. Below is worksheet.
 

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

restart;

ode:=diff(y(x),x$2)+diff(y(x),x)+y(x)=0;
IC1:=eval(diff(y(x),x),x=a)=b;
IC2:=D(y)(a)=b;
IC3:=subs(x=a,D(y)(x)=b);

diff(diff(y(x), x), x)+diff(y(x), x)+y(x) = 0

diff(y(a), a) = b

(D(y))(a) = b

(D(y))(a) = b

dsolve([ode,IC1]);

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: {y(a), y(x)}

dsolve([ode,IC2]);

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: {y(a), y(x)}

dsolve([ode,IC3]);

Error, (in dsolve) found differentiated functions with same name but depending on different arguments in the given DE system: {y(a), y(x)}

#eval works if the point is actual value as in
IC1:=eval(diff(y(x),x),x=0)=b;

eval(diff(y(x), x), {x = 0}) = b

#but I want x=a in the above.


Download how_to_set_IC_point_to_symbol.mw

There is no issue for dirichlet initial condition, where  y(a)=b works. It is the  neumann one which I can't figure its syntax. So this works OK

ode:=diff(y(x),x$2)+diff(y(x),x)+y(x)=0;
IC1:=y(a)=b;
dsolve([ode,IC1]);

Maple help pages keep getting worst with each release.

I want all input to be displayed using Maple 1D notation, so I can copy the example to my worksheet since I only use worksheet and not document (2D) mode.

So even though the first thing I do when I open help it to turn off the 

                     view->Display examples with 2D

So it is no longer checked, I still see many pages using 2D math for input. 

Here is one example ?D  page

If I copy one such input to my worksheet now it looks like this

eveything in 2D becomes ?? when I copy it.

So one can only look but not copy?

Is there any other option to make sure, really make sure, all examples have 1D as input?

The problem is that it is all not consistent. Some examples have a mix of 2D and 1D as the above page. Some are in 2D and some are in 1D.

And this is all on the same help page!

Does no one inside Maplesoft even look at their own help pages?
 

At school the teacher always said that if we have second order ode and only one initial conditions (say y'(0)=0 or y(0)=0) then the solution should have one constant of integration in it.

And if we have no initial conditions, then the solution should have 2 constants of integrations in it.

And if we have two initial conditions, then the solution should have zero constants of integrations in it.

In this example, Maple is given second order ode with one IC. But the solution it gives when asked to solve it explicit, has no constant of integration in it at all. 

When asked to solve it using implicit, then the constant of integration shows up. 

Both solutions actually verify to be fully correct using odetest. So it looks like the solution as explicit is particular solution and not a general solution.

Why is that? Why it did not give general solution when asked to solve the ode as explicit?

restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.1, Windows 10, June 25 2024 Build ID 1835466`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1793 and is the same as the version installed in this computer, created 2024, August 25, 9:6 hours Pacific Time.`

libname;

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

restart;

ode:=y(x)*diff(y(x),x$2)+diff(y(x),x)^2+1=0;
IC:=D(y)(0)=1;

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

(D(y))(0) = 1

sol1:=dsolve([ode,IC],explicit);
 

y(x) = (-x^2+x*2^(1/2)+1/2)^(1/2)

sol2:=dsolve([ode,IC],implicit);

-(1/2)*y(x)^2+x*y(0)-(1/2)*x^2+c__2 = 0

odetest(sol1,[ode,IC]);
odetest(sol2,[ode,IC]);

[0, 0]

[0, 0]

 

 

Download why_missing_constant_of_integration_august_25_2024.mw

The second result is definitely wrong, but why is this? 

MmaTranslator:-FromMma("Subscript[x, 0] -> 2 (y - z) (y - z)");
                       MmaTranslator:-FromMma(

MmaTranslator:-FromMma("Subscript[x, 0] -> 2 (y - z)^2"); # should return: x[0] = 2*(y - z)^2
                      MmaTranslator:-FromMma(

The result is still wrong even if I type an explicit multiplication sign (for instance, "Subscript[x, 0] -> 2*(y - z)^2"). 

On a Windows 10 installation with

I get after system restart and Maple launch

followed by

What could be the cause that the update is not downloading and how to fix it?

I am trying to understand under which conditions submenus disappear.

Now I have seen that the context panel is empty when submenues disappear.

Has anybody noticed the same and are there other instances when the context panel is emtpy?

Both effects could have the same rootcause.

Here is an example:
A -> no submenu

B -> Empty context panel

C -> Menu appears inside workspace (first time I see that)

 

Update

C seems to happen when the Maple window is not maximized to the full screen. -> then the context pannel becomes empty (for some reason) -> then if the Maple window is maximized to full screen we see C. Opeing new documents do not show this when toggling between and

First 20 21 22 23 24 25 26 Last Page 22 of 37