MaplePrimes Questions

Should maple have given solution to x as zero in the following?

solve(x^n=0,x)

What if n is zero? what if n is negative?  

Another program I tried this on gives

Maple 2025

Hello,

I am working with the following overdetermined system of nonlinear equations in Maple and attempting to solve it for the unknowns xi[3] and xi[8].

 [sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2)/xi[8] = sqrt(beta*rho - beta), (-rho + 1 + sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2))/(xi[3]*xi[8] - 1) = sqrt(beta*rho - beta), -(-rho*xi[3]*xi[8] + sqrt(beta*rho*xi[8]^2 - beta*xi[8]^2) + xi[3]*xi[8])/(xi[8]*(xi[3]*xi[8] - 1)) = rho - 1]

Maple returns the following solution:

{xi[3] = (-rho + sqrt(beta*(rho - 1)) + 1)/sqrt(beta*(rho - 1)), xi[8] = -(-rho + sqrt(beta*(rho - 1)) + 1)/(rho - 1)}

However, when I substitute the solution back into the original equations, the left-hand side should equal the right-hand side. Yet, using simplify(subs(solution, equation)) does not reduce the expression sufficiently to verify the equality.

Am I missing something in the simplification process?

Many thanks,

Ed

We can say, a test example. Probably a continuation of this topic.
An equation with one variable X, and let 0<X. To try to find such a largest value of X, in the neighborhood of which not a single solution will be missed in the amount of at least 50 solutions in a row. And in this case, the residual value of the equation discrepancy will be no more than 10^-7 .

f :=0.995-cos(0.25*x)*sin(x^3);

Purely for fun, of course.

I am working on a script (attached sheet) where I use a FOR loop to iterate over different values of varepsilon. Within each iteration, I perform the following steps:

  1. I optimize the function R_out and obtain a result, denoted as Pc

  2. I then substitute Pc into another function, L_out and optimize it to find the values of p1,p2, and the corresponding function value.

I follow a similar procedure for a second case as well.

However, I'm encountering an issue: I'm unable to successfully substitute the result from R_out into L_out within the loop. This is causing an error in execution.

Finally, I intend to generate a plot with varepsilon  on the x-axis and certain result variables on the y-axis in a single plot (as indicated at the end of the sheet).

Sheet: Question_New.mw

Can someone help me:

  1. Fix the substitution error in the loop, and

  2. Provide the correct syntax for generating the desired plot?

Hello,

i try to create a quiz. Is it possible to set a comlex math expression like the first expression in my document for a choice? In the Helppage I did not see the oppertunity to use an Integral expression for example. Or is it posssible to use 2D Math Input for the choices ? 

int(diff(u, t), s = A .. E)+(1/2)*u__E^2"+(&int;)[A]^(E)(1)/(`&varrho;`)(&DifferentialD;)/(&DifferentialD; s)p &DifferentialD;s+`&varphi;__E`=(1)/(2)(`u__A`)^(2)+`&varphi;__A`;"

Error, (in int) wrong number (or type) of arguments: invalid options or option values passed to definite integration.

 

Error, (in int) wrong number (or type) of arguments: invalid options or option values passed to definite integration.

 

with(Grading)

A := Array()

A(1) := Grading:-Quiz("Welche der folgenden Varianten der Bernoullischen Gleichung sind korrekt?", 3, ["A", "B", "C"], 'style' = multiplechoice, 'output' = `module`)

Grading:-Quiz(A, numberformat = lowercaseroman, numberprefix = "Frage 1.", border = true)

 

``

Download 1.mw

I'm optimizing a function with constraints, meaning the decision variable has both a lower and an upper bound. When I use the  (MAX) syntax in Maple, it returns the lower bound as the optimal value (Pc) along with the corresponding function value. However, when I plot the graph, it shows that the function actually reaches its maximum at the upper bound. What could be causing this discrepancy

Sheet:Q_result_1.mw

Should solution to a first order ode with IC not have any constant of integration in it? This is what the teacher said at school.

But Maple in this example returns a solution to first order Riccati ode with c1 still in the solution even though it is given IC.

How is this possible? This is problem from Differential equations and their applications, 3rd ed., M. Braun, Section 1.10. Page 80, problem #5

If dsolve was not able to resolve c1 from IC for some reason, should it not have returned any solution in this case? 

btw, I could not verify the solution on the ode itself using odetest, but may be assumptions are needed. Will try and see...

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 19 and is the same as the version installed in this computer, created May 21, 2025, 13:44 hours Eastern Time.`

Physics:-Version();

 

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

restart;

libname;

"/home/me/maple/toolbox/2025/Physics Updates/lib", "/home/me/maple/toolbox/2025/Maple Customer Support Updates/lib", "/home/me/maple2025/lib"

ode:=diff(y(x),x)=1+y(x)+y(x)^2*cos(x);
IC:=y(0)=0;
maple_sol:=dsolve([ode,IC]);

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

y(0) = 0

y(x) = -(1/2)*csgn(sin((1/2)*x))*(MathieuS(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1+4*MathieuS(-1, -2, arccos(cos((1/2)*x)))*cos(x)*c__1-MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))*c__1-c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))+c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+MathieuC(-1, -2, arccos(cos((1/2)*x)))*csgn(sin((1/2)*x))+4*MathieuC(-1, -2, arccos(cos((1/2)*x)))*cos(x)+MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuC(-1, -2, arccos(cos((1/2)*x))))/((c__1*MathieuS(-1, -2, arccos(cos((1/2)*x)))-c__1*MathieuSPrime(-1, -2, arccos(cos((1/2)*x)))-MathieuCPrime(-1, -2, arccos(cos((1/2)*x)))+MathieuC(-1, -2, arccos(cos((1/2)*x))))*cos(x))

lprint(maple_sol);

y(x) = -1/2*csgn(sin(1/2*x))/(c__1*MathieuS(-1,-2,arccos(cos(1/2*x)))-c__1*
MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,arccos(cos(1/2*x)))
+MathieuC(-1,-2,arccos(cos(1/2*x))))*(MathieuS(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))*c__1+4*MathieuS(-1,-2,arccos(cos(1/2*x)))*cos(x)*c__1-MathieuSPrime
(-1,-2,arccos(cos(1/2*x)))*csgn(sin(1/2*x))*c__1-c__1*MathieuS(-1,-2,arccos(cos
(1/2*x)))+c__1*MathieuSPrime(-1,-2,arccos(cos(1/2*x)))-MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))*csgn(sin(1/2*x))+MathieuC(-1,-2,arccos(cos(1/2*x)))*csgn(
sin(1/2*x))+4*MathieuC(-1,-2,arccos(cos(1/2*x)))*cos(x)+MathieuCPrime(-1,-2,
arccos(cos(1/2*x)))-MathieuC(-1,-2,arccos(cos(1/2*x))))/cos(x)

 

 

Download why_c_in_solution_may_23_2025.mw

Update

Looked up the textbook, it says solution exist and unique over 0<=x<=1/3, using these now Maple verifies the ode itself, but does not verify the IC (because c__1 is there). Here is updated worksheet. The bottom line, I think the solution is wrong as it should not have any constant of integration in it. Textbook also does say what the solution should be.

restart;

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

SupportTools:-Version();

`The Customer Support Updates version in the MapleCloud is 20. The version installed in this computer is 19 created May 21, 2025, 13:44 hours Eastern Time, found in the directory /home/me/maple/toolbox/2025/Maple Customer Support Updates/lib/Maple`

Physics:-Version();

 

`The "Physics Updates" version in the MapleCloud is 1873 and is the same as the version installed in this computer, created 2025, May 18, 21:44 hours Pacific Time.`

restart;

libname;

"/home/me/maple/toolbox/2025/Physics Updates/lib", "/home/me/maple/toolbox/2025/Maple Customer Support Updates/lib", "/home/me/maple2025/lib"

ode:=diff(y(x),x)=1+y(x)+y(x)^2*cos(x);
IC:=y(0)=0;
maple_sol:=dsolve([ode,IC]):
simplify(maple_sol) assuming x>=0 and x<=1/3;

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

y(0) = 0

y(x) = (2*c__1*MathieuS(-1, -2, (1/2)*x)+2*MathieuC(-1, -2, (1/2)*x))/(c__1*MathieuSPrime(-1, -2, (1/2)*x)-c__1*MathieuS(-1, -2, (1/2)*x)+MathieuCPrime(-1, -2, (1/2)*x)-MathieuC(-1, -2, (1/2)*x))

odetest(%,[ode,IC]);

[0, -2/(c__1-1)]

 

 

Download why_c_in_solution_may_23_2025_v2.mw

Suppose we have two equations, and all parameters involved are assumed to be positive. Is there a systematic way or syntax to determine whether C1>C2​ or vice versa? Additionally, can we derive specific conditions under which C1>C2​ holds

Sheet: Q_greater.mw

I have just started to use Maple workbook (*.maple). In the workbook, there are 4 worksheets: "main.mw","calc1.mw","calc2.mw","calc3.mw". In "main.mw", I plot variables saved from "calc?.mw". This works. However, when I make changes in one of the worksheet "calc?.mw" and get the new expressions for the variables, they are not updated in "main.mw". I deleted the variables being changed but "main.mw" still run and show the old expressions of these variables.

How do I refresh so that "main.mw" will show the updated variables from "calc?.mw"?

Thanks.

Hi,

I’ve [K] & [M] matrices in sparse format for FE code. How do I convert them to be able to do eigensolution?

restart;

with(LinearAlgebra);

stiffness_data := ImportMatrix("d:/Simulation_1_STIF1.csv");

stiffness_matrix := Matrix(max(stiffness_data[() .. (), 1]), max(stiffness_data[() .. (), 2]), sparse = [seq([stiffness_data[i, 1], stiffness_data[i, 2], stiffness_data[i, 3]], i = 1 .. nops(stiffness_data))]);

Error, (in Matrix) argument `sparse = [[1, 1, 328.0000000], [1, 5, -20434.40000], [5, 1, -20434.40000]]` is incorrect or out of order

Even if I try with a simple matrix example it gave an error.

with(LinearAlgebra);

A := Matrix(5, 5, sparse = [[1, 1, 328.0], [1, 5, -20434.4], [5, 1, -20434.4]]);

Error, (in Matrix) argument `sparse = [[1, 1, 328.0], [1, 5, -20434.4], [5, 1, -20434.4]]` is incorrect or out of order

Please help.

Thanks,

Shashi

Trying to produce two different font sizes within a plot title.  I can achieve it with Typesetting but I'm getting brackets and fluff I don't want.  Any other ideas?

For example

with(Typesetting):
plot(x^2, title = [cat(mtext("sort of", font = "TimesNewRoman", size = 30), mtext("works", size = 10))])

Dear Power Users,

This is probably a simple question for you but I am stuck. In the attached worksheet I would like to plot (the plot is called P5) a vector with units (mm) against a vector without units. This didn't work out, so I removed the units from the vector with units, and this plotted but after the conversion the numeric values are no longer in mm but inches. How can I correct this?

Thank you in advance for your time and willingness to help.

testSheetHorseShoe.mw

Hello,

I have a few questions.

  1. When using ordered list, it keeps getting out of order. It will do 1, 2, then 5, 6 sometimes. If I tried to delete incorrectly numbered list, instead of restarting from the correct order, it will keep incrementing.
  2. How do I create a indented bullet list?
  3. Documentation for Maple 2025 doesn't seem to be up to date. I am looking to use "Tabkey" to indent text. It seems really difficult to get it done. Where do I find "Format>Tab Navigation"?
    1. https://www.maplesoft.com/support/help/Maple/view.aspx?path=worksheet/documenting/tabkey

Thanks for the help.

in some of my function i have a big problem which i can't plot thus function even i know what is the shape of plot, i have two type of ploting directly giving parameter and using explor but for this kind of plot we can't use explor so i have to give the function directly parameter but is wasting my time a lot and i can't get my plot even spending a days by changing parameter one by one, my questions is this how i can plot this kind of function without bieng a singular i need this function to be non singular is not importan about the parameter can be any number 
thanks for any help 

plots-long_term_.mw

the shape of plot must be like this but must have two of them 

4 5 6 7 8 9 10 Last Page 6 of 2421