Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I've modified my call to coulditbe() to always use assuming real to prevent false positives.

Now I find it gives internal error Error, (in type/complex) too many levels of recursion which can not even be trapped when the thing I am checking happened to have complex I in it. (This is done in code).

So I modied the code to only do this check if there is no complex in the expression being checked.

But I think Maple should not generate such error in first place. This indicates some internal problem in Maple, correct?

Here is worksheet. (ps. updated, wrong worksheet for somereason was uploaded).

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

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

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    coulditbe(the_residual=0) assuming real;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

Error, (in type/complex) too many levels of recursion

the_residual:=-1/4*I*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)-1/4*x^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)-x^(1/2);
try
    if not has(the_residual,I) then
       coulditbe(the_residual=0) assuming real;
    else
       print("by passing, since residual is complex");
    fi;
catch:
   print("error");
end try;

-((1/4)*I)*x^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)*6^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-(1/4)*x^(1/2)*2^(1/2)*(-(8*x^(3/2)+12*c__1)^(2/3)-I*(8*x^(3/2)+12*c__1)^(2/3)*3^(1/2))^(1/2)/(8*x^(3/2)+12*c__1)^(1/3)-x^(1/2)

"by passing, since residual is complex"

 


 

Download internal_error_too_many_Levels_from_coulditbe_august_23_2024.mw

while i am writing code for loop with if condition i am having problem kindly help me out i am sharing fileburgers_type_method.mw

Can solve give internal Maple error of division by zero to the caller?

Also when I run this using kernelopts('assertlevel'=1): or kernelopts('assertlevel'=2):, then not able to catch the internal error any more, which is division by zero using try/catch.

Only when kernelopts('assertlevel'=0).  can try/catch trap the error.

This means now I have to set kernelopts('assertlevel'=0) before calling solve to be able to trap the error and set it back to kernelopts('assertlevel'=2) after that, else the whole program halts.

But my main question is: can solve throw internal error of division by zero? I mean, is this expected sometimes to happen? I would have thought Maple should internally catch this and simply return no solution if can't solve it.

This equation is auto generated and the program calling solve on it to see if it can solve it.

Here is the worksheet

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 1792 and is the same as the version installed in this computer, created 2024, August 22, 12:6 hours Pacific Time.`

libname;

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

eq:=1 = 1/((exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X + exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*x0 + 2*Y + 2*y0)^2*Y*(exp(X*Y)^2*exp(X*y0)^2*exp(x0*Y)^2*exp(x0*y0)^2*X + exp(X*Y)^2*exp(X*y0)^2*exp(x0*Y)^2*exp(x0*y0)^2*x0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*Y^2 + 4*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*Y*y0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*X*y0^2 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*Y^2*x0 + 4*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*Y*x0*y0 + 2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0)*x0*y0^2 - X^2*exp(X*Y)*exp(X*y0)*exp(x0*Y)*exp(x0*y0) - 2*exp(X*Y)*exp(X*y0)*x0*exp(x0*Y)*exp(x0*y0)*X - exp(X*Y)*exp(X*y0)*x0^2*exp(x0*Y)*exp(x0*y0) - 2)):

kernelopts('assertlevel'=2):
try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);
end try;

Error, (in unknown) assertion failed

kernelopts('assertlevel'=1):

try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);;
end try;

Error, (in unknown) assertion failed

kernelopts('assertlevel'=0):

try
   solve(identity(eq,X),[x0, y0]);
catch:
   print(lastexception);
end try;

unknown, "numeric exception: division by zero"

 


 

Download division_by_zero_solve_identity_august_23_2024.mw

Hello,

Are there any tools in Maple that allow you to find real roots of complex integral equations?

I have attached examples of such equations.

Unfortunately, I can't solve them.

Best regards.

Test.mw

Hello community,

I recently became a Maple Ambassador and  I would like to ask about some portals that were mentioned to me. Are these portals on mapleprimes and how can I access them?

I was thinking that I could also create a LinkedIn group, so that I could present there the activities I will do at the university, the online workshops I will do in the future or upload material from student projects.

Best Regards,

Athanasios Paraskevopoulos

Studying the attached documentDuffing Equation from the University of Colorado, I tried to plot the Duffing equation in three different ways. My worksheet is attached.
But I didn't get the desired result as you can see below. Any suggestion on how to fix my problem?

 

Download Example.mw

 

This ode has solution when solving for the IC by hand. But Maple gives new error I did not see before when asking it to solve the ode with IC. 

No error if asked to solve the ODE without the IC.

Is this new error in dsolve? I have no earlier Maple versions to check. Below is worksheet. Solving for the IC by hand gives the solution which odetest verified.

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 1789 and is the same as the version installed in this computer, created 2024, August 10, 8:50 hours Pacific Time.`

ode := diff(y(x), x) = sqrt(2)*sqrt(-(y(x) - 6)*(2*y(x) - 3))/(-y(x) + 6);
IC:=y(0)=3;

diff(y(x), x) = 2^(1/2)*(-(y(x)-6)*(2*y(x)-3))^(1/2)/(-y(x)+6)

y(0) = 3

sol:=dsolve(ode);

x-(1/4)*(-4*y(x)^2+30*y(x)-36)^(1/2)-(9/8)*arcsin((4/9)*y(x)-5/3)+c__1 = 0

sol_with_IC:=dsolve([ode,IC]); #why this error??

Error, (in dsolve) when calling 'series/RootOf'. Received: 'unable to compute series'

#lets solve for the IC by hand:
eq:=eval(sol,[y(x)=3,x=0])

-(1/4)*18^(1/2)+(9/8)*arcsin(1/3)+c__1 = 0

C_sol:=PDEtools:-Solve(eq,_C1);

c__1 = (3/4)*2^(1/2)-(9/8)*arcsin(1/3)

my_new_sol:=eval(sol,C_sol)

x-(1/4)*(-4*y(x)^2+30*y(x)-36)^(1/2)-(9/8)*arcsin((4/9)*y(x)-5/3)+(3/4)*2^(1/2)-(9/8)*arcsin(1/3) = 0

odetest(my_new_sol,[ode,IC])

[0, 0]

 


 

Download internal_error_when_unable_to_find_solution_august_22_2024.mw

i have solution of ODE but again i want take derivative from solution function F then i want take reciprocal of derivative
if F'=G then i want 1/F'=1/G like that i want all solution by list and if possible don't give the parameter a sequence  it will be better

thanks for any help

K := diff(G(xi), xi $ 2) = -lambda*diff(G(xi), xi) - mu;
                 2                                    
                d                    / d        \     
          K := ----- G(xi) = -lambda |---- G(xi)| - mu
                   2                 \ dxi      /     
                dxi                                   

V:= [seq](-1..1, 1/2);
                          [    -1     1   ]
                     V := [-1, --, 0, -, 1]
                          [    2      2   ]

interface(rtablesize= nops(V)^3):
DataFrame(
    <seq(seq(<a | b | rhs(dsolve(eval(K, [lambda,mu]=~ [a,b])))>, a= V), b= V)>,
    columns= [lambda, mu, F]
);

loading

Error occurred during PDF generation. Please refresh the page and try again

Dear Expert Users,

I am still struggling with my transition from Mathcad 15 to Maple. Would someone be so kind to look at the attached worksheet and how I can obtain the desired result? Thanks in advance. The data used in the example come from TestFleck.xlsx

QuestionPrimes.mw TestFleck.xlsx

Hi
my odetest must give me zero everything is true but still not simplify the function with power include 1/n  not do cancelation even

test_sol_for_PDE.mw

*****************************

EDIT: Thanks for the help i used the restore backup feature. I made my anti virus not react to maple since i thought that might work, so far no more problems. Else this is a fix if anybody else has this problem.

******************************

Hi, so my maple freezes during simple tasks, such as trying to type something, or somtimes copying and inerting the results from a previous equation, the feature where you mark something and drag the answer to somewhere else also does this. When this happens, maple completely freezes and i'm forced to close the app with taksmanager, where i lose everything i have worked on, sometimes for the past hour because i didn't save every minute which is basically not something you can do.

Is there any fix for this or anything i can do to prevent this, cause it really sucks. 

I'm on a windows 11 with maple 2024

i have  written summation with  two  loops at the end and the result should be start from uNew[1][1] since values of i is starting from 1 but in the result i am getting uNew[0][1] why? for understanding of question i am attaching my file kindly help me sort out the problemautomatic_differentiation.mw

VerifyTools is a package that has been available in Maple for roughly 24 years, but until now it has never been documented, as it was originally intended for internal use only. Documentation for it will be included in the next release of Maple. Here is a preview:

VerifyTools is similar to the TypeTools package. A type is essentially a predicate that a single expression can either satisfy or not. Analogously, a verification is a predicate that applies to a pair of expressions, comparing them. Just as types can be combined to produce compound types, verifications can also be combined to produce compund verifications. New types can be created, retrieved, queried, or deleted using the commands AddType, GetType (or GetTypes), Exists, and RemoveType, respectively. Similarly in the VerifyTools package we can create, retrieve, query or delete verifications using AddVerification, GetVerification (or GetVerifications), Exists, and RemoveVerification.

The package command VerifyTools:-Verify is also available as the top-level Maple command verify which should already be familiar to expert Maple users. Similarly, the command VerifyTools:-IsVerification is also available as a type, that is,

VerifyTools:-IsVerification(ver);

will return the same as

type(ver, 'verification');

The following examples show what can be done with these commands. Note that in each example where the Verify command is used, it is equivalent to the top-level Maple command verify. (Also note that VerifyTools commands shown below will be slightly different compared to the Maple2024 version):

with(VerifyTools):

Suppose we want to create a verification which will checks that the length of a result has not increased compared to the expected result. We can do this using the AddVerification command:

AddVerification(length_not_increased, (a, b) -> evalb(length(a) <= length(b)));

First, we can check the existence of our new verification and get its value:

Exists(length_not_increased);

true

GetVerification(length_not_increased);

proc (a, b) options operator, arrow; evalb(length(a) <= length(b)) end proc

For named verifications, IsVerification is equivalent to Exists (since names are only recognized as verifications if an entry exists for them in the verification database):

IsVerification(length_not_increased);

true

On the other hand, a nontrivial structured verification can be checked with IsVerification,

IsVerification(boolean = length_not_increased);

true

whereas Exists only accepts names:

Exists(boolean = length_not_increased);

Error, invalid input: VerifyTools:-Exists expects its 1st argument, x, to be of type symbol, but received boolean = length_not_increased

The preceding command using Exists is also equivalent to the following type call:

type(boolean = length_not_increased, verification);

true

Now, let's use the new verification:

Verify(x + 1/x, (x^2 + 1)/x, length_not_increased);

true

Verify((x^2 + 1)/x, x + 1/x, length_not_increased);

false

Finally, let's remove the verification:

RemoveVerification(length_not_increased);

Exists(length_not_increased);

false

GetVerification(length_not_increased);

Error, (in VerifyTools:-GetVerification) length_not_increased is not a recognized verification

GetVerifications returns the list of all verifications known to the system:

GetVerifications();

[Array, FAIL, FrobeniusGroupId, Global, Matrix, MultiSet, PermGroup, RootOf, SmallGroupId, Vector, address, after, approx, array, as_list, as_multiset, as_set, attributes, boolean, box, cbox, curve, curves, dataframe, dataseries, default, default, dummyvariable, equal, evala, evalc, expand, false, float, function, function_bounds, function_curve, function_shells, greater_equal, greater_than, in_convex_polygon, indef_int, interval, less_equal, less_than, list, listlist, matrix, member, multiset, neighborhood, neighbourhood, normal, permute_elements, plot, plot3d, plot_distance, plotthing_compile_result, polynom, procedure, ptbox, range, rational, record, relation, reverse, rifset, rifsimp, rtable, set, sign, simplify, sublist, `subset`, subtype, superlist, superset, supertype, symbol, table, table_indices, testeq, text, true, truefalse, type, undefined, units, vector, verifyfunc, wildcard, xmltree, xvm]

Download VerificationTools_blogpost.mw

Austin Roche
Software Architect
Mathematical Software
Maplesoft

Hi
most of my equation when i wanna solve it is give me something like thus equation and it take a lot time to calculate and i don't get any answer after 1 hour past and still searching for finding parameter how i can do in fast way or maybe if exist  can i use mathematica or matlab is better for calculating this or not ?

F-P.mw

First 7 8 9 10 11 12 13 Last Page 9 of 2144