Maple Questions and Posts

These are Posts and Questions associated with the product, Maple

I see a number of MaplePrimes questions answered with good examples using prefix notation.  Is there good reference material somewhere that can show me how to make use of prefix notation when using Maple?  It's not always obvious (to me) how to construct maple commands using prefix operators so I typically just use the standard commands.  Understanding Maples prefix notation would help in understanding some of the answers given to questions in this forum.  Thanks.

Question is attached:

I describe in words the problem I want to solve with Maple. I'll need to work with random variables.

I want to compute Var[A+B+C] where A, B, and C are not independent of each other. In particular, I don't know how to compute Cov[A,B], Cov[A,C], and Cov[B,C]. The model specifications follow.

Let:

A = X__1*(-lambda__1*X__1-lambda__1*delta__1+nu__1-nu__01);
B = X__2*(-lambda__2*X__2-lambda__2*delta__2+nu__2-nu__02);
A = X__3*(-lambda__3*X__3-lambda__3*delta__3+nu__1+nu__2-nu__01-nu__02);

A = X__1*(-X__1*lambda__1-delta__1*lambda__1-nu__01+nu__1)

 

B = X__2*(-X__2*lambda__2-delta__2*lambda__2-nu__02+nu__2)

 

A = X__3*(-X__3*lambda__3-delta__3*lambda__3-nu__01-nu__02+nu__1+nu__2)

(1)

where lambda__1, lambda__2, and lambda__3 are constants. Moreover, nu__01 is the mean of nu__1~N(nu__01,sigma__nu^2)
and nu__02 is the mean of nu__2~N(nu__02,sigma__nu^2). Note that nu__1 and nu__2 have the same variance and are independent of each other.

In addition:

X__1 = beta__1*(nu__1+nu__2-nu__01-nu__02)+alpha__1*delta__1+alpha__2s*delta__2;
X__2 = beta__2*(nu__1+nu__2-nu__01-nu__02)+alpha__2*delta__2+alpha__1s*delta__1;
X__3 = beta__3*(nu__1+nu__2-nu__01-nu__02)+alpha__3*delta__3;

X__1 = beta__1*(nu__1+nu__2-nu__01-nu__02)+alpha__1*delta__1+alpha__2s*delta__2

 

X__2 = beta__2*(nu__1+nu__2-nu__01-nu__02)+alpha__2*delta__2+alpha__1s*delta__1

 

X__3 = beta__3*(nu__1+nu__2-nu__01-nu__02)+alpha__3*delta__3

(2)

where beta__1, beta__2, beta__3, alpha__1, alpha__2, alpha__3, alpha__1s, alpha__2s are constants. Moreover, delta__1~N(0,sigma__d^2), delta__2~N(0,sigma__d^2), and delta__3~N(0,sigma__d3^2) (note the different variance for delta__3). The variables delta__1, delta__2, and delta__3 are independent of each other. Moreover, nu__1 and nu__2 are independent of delta__1, delta__2, and delta__3.

Now, A, B, C are all products of the form W*Q. In general, Var[W*Q] can be found by applying a formula*** which here reduces to Var[W*Q] = sigma__W^2*sigma__Q^2+(Cov[W,Q])^2, where Cov[W,Q] is simply E[W*Q] since E[W]=0 and E[Q]=0 in my three cases. In short, it's relatively straightforward to find Var[A], Var[B], and Var[C]. However, I don't know about the covariance terms. How to tackle the covariance terms, i.e., Cov[A,B], Cov[A,C], and Cov[B,C]?


***See @whuber's comment in Prof. Dilip Sarwate's answer here https://stats.stackexchange.com/questions/15978/variance-of-product-of-dependent-variables


Perhaps it would be useful to automate the computation of E[A+B+C] as well. However, I managed to compute the expectation by hand, with pen and paper. It would be nice to double check with a script.

Download variance_of_sum_of_products.mw

Want to make a rectangular graph (in the sense of Graph Theory) of 4 copies of the path A-B-C-D i.e. four rows of this path. Once the rectangular or matrix like graph is made its ediges are to be weighted as the matrix position of vertex stating from (1,1) at the upper left vertex i.e. "A". Help please.

Hi everyone! :)

I'm new to Maple, so please forgive me if the solution is obvious, but I could not find any fitting articles for my problem.

I have a transfer function and need to find the poles. Later, I want to calculate the constants to meet my filter requirements. For now, I'm focusing on getting a symbolic solution and evaluating the poles.

Here's my setup:


Here is the File NoiseFilter.mw

 

 

When I use the "evalf" function, it gives me a large sum, but I would like to get one complex numerical result.

I appreciate any help! :)

I would expect I could do

A := DataSeries([2, 3, 4], datatype = float)
B := DataSeries([1, 3, 19], datatype = float)
min~(A, B)

but the last command gives me 

Error, (in DataSeries:-min) invalid boolean expression: 2.

How do I find the element-wise min (i.e. DataSeries([1,3,4], datatype=float)) of two DataSeries?

This code used to work OK in Maple 2023.2.1 on windows 10. Now it gives this new internal Maple error 

Error, (in property/ConvertRelation) numeric exception: division by zero

I think this is new problem in Maple 2024 as I have not seen it before. Will report it to Maplesoft. Mean while if someone has any workaround other than not using the `is` command will try it.

The following are two worksheets. One using 2023 shows it works OK (no error) and one in Maple 2024 with the new error

203072

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

restart;

203072

r:=1/4*a*(a*x^2+6);
tmp:=-1/x^2+1/2*a+(1/x+1/2*a*x)^2;
is(tmp = r)

(1/4)*a*(a*x^2+6)

-1/x^2+(1/2)*a+(1/x+(1/2)*a*x)^2

true

 

 

Download no_numeric_exception_march_7_2024_version_2023.mw
 

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

restart;

r:=1/4*a*(a*x^2+6);
tmp:=-1/x^2+1/2*a+(1/x+1/2*a*x)^2;
is(tmp = r)
 

(1/4)*a*(a*x^2+6)

-1/x^2+(1/2)*a+(1/x+(1/2)*a*x)^2

Error, (in property/ConvertRelation) numeric exception: division by zero

 

 

Download numeric_exception_march_7_2024_version_2024.mw

I was wondering if this is by design or not. Here is one example., This ode is solved by Maple 2023.2.1 on windows 10. The solution is in terms of DESol though. It takes less than one minute.

In Maple 2024 on same PC, dsolve hangs on it.

If this by design? Since DESol solution is not very useful actually. I was thinking that may be Maple is now trying to return a solution without DESol in it, and that is why it hangs or take long time. I stopped it after 5 minutes. 

Or should I report it to Maplesoft as possible bug?  

Below are 2 worksheets. One using Maple 2023 and one using 2024.

42444

interface(version);

`Standard Worksheet Interface, Maple 2023.2, Windows 10, November 24 2023 Build ID 1762575`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1684. The version installed in this computer is 1672 created 2024, February 7, 18:34 hours Pacific Time, found in the directory C:\Users\Owner\maple\toolbox\2023\Physics Updates\lib\`

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #after about 1 minute...

u(x) = DESol({diff(diff(_Y(x), x), x)-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(x-1)*cosh(1/(x-1))*(diff(_Y(x), x))/(x+1)+(x+1)*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*_Y(x)/((x-1)^2*cosh(1/(x-1))^2)}, {_Y(x)})

 

 

Download dsolve_march_7_2024_maple_2023.mw


restart;

interface(version);

`Standard Worksheet Interface, Maple 2024.0, Windows 10, March 01 2024 Build ID 1794891`

ode:=(x + 1)*diff(u(x), x, x)/((x - 1)*cosh(1/(x - 1))) - (1/((x - 1)*cosh(1/(x - 1))) - (x + 1)/((x - 1)^2*cosh(1/(x - 1))) + (x + 1)*sinh(1/(x - 1))/((x - 1)^3*cosh(1/(x - 1))^2) + (-2*x^3 - 2*x^2)*(x + 1)/((x - 1)^2*cosh(1/(x - 1))^2))*diff(u(x), x) + (x + 1)^2*(x^5 + x^4 + 2*x^2*cosh(1/(x - 1)) - 2*x*cosh(1/(x - 1)) - x - 1)*u(x)/((x - 1)^3*cosh(1/(x - 1))^3);

(x+1)*(diff(diff(u(x), x), x))/((x-1)*cosh(1/(x-1)))-(1/((x-1)*cosh(1/(x-1)))-(x+1)/((x-1)^2*cosh(1/(x-1)))+(x+1)*sinh(1/(x-1))/((x-1)^3*cosh(1/(x-1))^2)+(-2*x^3-2*x^2)*(x+1)/((x-1)^2*cosh(1/(x-1))^2))*(diff(u(x), x))+(x+1)^2*(x^5+x^4+2*x^2*cosh(1/(x-1))-2*x*cosh(1/(x-1))-x-1)*u(x)/((x-1)^3*cosh(1/(x-1))^3)

DEtools:-odeadvisor(ode);

[[_2nd_order, _with_linear_symmetries]]

dsolve(ode); #hangs

 

 

Download dsolve_march_7_2024_maple_2024.mw

One may easily spot that the symbols “” and “” are missing here and here

These two PDF files were printed officially, so I think they can be considered examples of best practice for the export functionality. Does this mean that this functionality is still defective in the most recent release?

I have an expression Z_val which I would like to rewrite in a compact, more readable form. Assuming that simplify() did its job, I thought of using (1) alias(), and (2) eval() with some combination of my parameters, since such combination occurs repetitively in my expression.

(1) is not particularly useful for my problem at hand. In particular, powers are not recognized and the alias I defined did not substitute the combination in all the places I was expecting to.

(2) is somehow effective but my expression becomes arguably even more complicated.

What else would you suggest?

EDIT:

restart;

local gamma;

gamma

(1)

M := -lambda*(beta^2*(sigma__v^2+sigma__e^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2;
V := simplify((1+(Cov__XY/(sigma__X*sigma__Y))^2)*(sigma__X*sigma__Y)^2);

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2

 

sigma__X^2*sigma__Y^2+Cov__XY^2

(2)

# Specify the terms, calculated by hand

sigma__X := beta^2*(sigma__v^2+sigma__e^2)+alpha^2*sigma__d^2;
sigma__Y := lambda^2*(beta^2*(sigma__v^2+sigma__e^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(1-2*lambda*beta);
Cov__XY := M;

beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2

 

lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1)

 

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2

(3)

V;

(beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2)^2*(lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1))^2+(-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2)^2

(4)

Z := M-(gamma/2)*V;

-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2-(1/2)*gamma*((beta^2*(sigma__e^2+sigma__v^2)+alpha^2*sigma__d^2)^2*(lambda^2*(beta^2*(sigma__e^2+sigma__v^2)+sigma__d^2*(alpha+1)^2)+sigma__v^2*(-2*beta*lambda+1))^2+(-lambda*(beta^2*(sigma__e^2+sigma__v^2)+alpha*sigma__d^2*(alpha+1))+beta*sigma__v^2)^2)

(5)

# Specify lambda, beta, and alpha

l := simplify(-gamma*sigma__e^2*sigma__v^2/(2*(sigma__e^2 + sigma__v^2)) + sigma__v^2*sqrt(gamma^2*sigma__d^2*sigma__e^4 + 4*sigma__e^2 + 4*sigma__v^2)/(2*(sigma__e^2 + sigma__v^2)*sigma__d));
b := simplify(eval(sigma__v^2/((gamma*sigma__e^2 + 2*lambda)*sigma__v^2 + 2*lambda*sigma__e^2), lambda = l));
a := simplify(eval(-lambda*(sigma__e^2 + sigma__v^2)/((gamma*sigma__v^2 + 2*lambda)*sigma__e^2 + 2*lambda*sigma__v^2), lambda = l));

(1/2)*sigma__v^2*(-gamma*sigma__e^2*sigma__d+(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2))/((sigma__e^2+sigma__v^2)*sigma__d)

 

sigma__d/(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2)

 

(1/2)*(gamma*sigma__e^2*sigma__d-(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2))/(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2)

(6)

Z_val := simplify(eval(Z, [lambda = l, beta = b, alpha = a]));

-(1/4)*sigma__d*sigma__v^2*(((-2*gamma^2*sigma__d^4*sigma__e^4-16)*sigma__v^6+(-6*gamma^2*sigma__d^4*sigma__e^6-4*gamma^2*sigma__d^2*sigma__e^4-48*sigma__e^2)*sigma__v^4-sigma__e^4*(gamma^4*sigma__d^6*sigma__e^6+4*gamma^2*sigma__d^4*sigma__e^4+8*gamma^2*sigma__d^2*sigma__e^2+48)*sigma__v^2-4*gamma^2*sigma__d^2*sigma__e^8-16*sigma__e^6)*(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^(1/2)+(2*sigma__d^2*sigma__v^8+(12*sigma__d^2*sigma__e^2+8)*sigma__v^6+2*(12+gamma^2*sigma__d^4*sigma__e^4+sigma__d^2*(gamma^2+13)*sigma__e^2)*sigma__e^2*sigma__v^4+8*(3+gamma^2*sigma__d^4*sigma__e^4+(1/2)*sigma__d^2*(gamma^2+6)*sigma__e^2)*sigma__e^4*sigma__v^2+sigma__e^6*(gamma^2*sigma__d^2*sigma__e^2+4)*(gamma^2*sigma__d^4*sigma__e^4+2*sigma__d^2*sigma__e^2+2))*sigma__d*sigma__v^2*gamma)/((sigma__e^2+sigma__v^2)^2*(gamma^2*sigma__d^2*sigma__e^4+4*sigma__e^2+4*sigma__v^2)^2)

(7)

eval(Z_val, gamma = Gamma/sigma__e/sigma__d);

-(1/4)*sigma__d*sigma__v^2*(((-2*Gamma^2*sigma__d^2*sigma__e^2-16)*sigma__v^6+(-6*Gamma^2*sigma__d^2*sigma__e^4-4*Gamma^2*sigma__e^2-48*sigma__e^2)*sigma__v^4-sigma__e^4*(Gamma^4*sigma__d^2*sigma__e^2+4*Gamma^2*sigma__d^2*sigma__e^2+8*Gamma^2+48)*sigma__v^2-4*Gamma^2*sigma__e^6-16*sigma__e^6)*(Gamma^2*sigma__e^2+4*sigma__e^2+4*sigma__v^2)^(1/2)+(2*sigma__d^2*sigma__v^8+(12*sigma__d^2*sigma__e^2+8)*sigma__v^6+2*(12+Gamma^2*sigma__e^2*sigma__d^2+sigma__d^2*(Gamma^2/(sigma__e^2*sigma__d^2)+13)*sigma__e^2)*sigma__e^2*sigma__v^4+8*(3+Gamma^2*sigma__e^2*sigma__d^2+(1/2)*sigma__d^2*(Gamma^2/(sigma__e^2*sigma__d^2)+6)*sigma__e^2)*sigma__e^4*sigma__v^2+sigma__e^6*(Gamma^2+4)*(Gamma^2*sigma__d^2*sigma__e^2+2*sigma__d^2*sigma__e^2+2))*sigma__v^2*Gamma/sigma__e)/((sigma__e^2+sigma__v^2)^2*(Gamma^2*sigma__e^2+4*sigma__e^2+4*sigma__v^2)^2)

(8)

Download expression_to_simplify.mw

chatGPT version used by the new NaturalLanguage package seems to be using chatGPT 3?. I asked it and this what it said

NL:=NaturalLanguage;
NL:-Query("what is your name?");
"As an Artificial Intelligence, I don't have a personal name. However, If 
you're asking how to represent the question \"What is your name?\" in MathML, 
it's actually irrelevant as MathML is used for marking up mathematical notations, 
not regular text or questions. \n\nBut in English, it's as simple 
as just asking \"What is your name?

Then I asked it 

NL:-Query("what version of chatGPT are you?");
"As an AI developed by OpenAI, I don't have a specific version like software 
programs or applications. I get continuous updates and improvements over time. 
However, as of my current operation, I'm based on GPT-3 model.

some questions: It is possible to make it use chatGPT 3.5 or 4.0 with NL?

How is this free to use and without getting a key from openAI? After agreeing to terms fromn the options menu, can one continue to use it for free? I thought chatGPT requires some fee to use. But I could be wrong.  but this is nice to be able to use it this easily from Maple!

Btw, It is still not very good in math. Asked it to first this simple first order ode and got wrong answer

NL:-Query("what is the solution to the differential equation y'(x)+y(x)=sin(x)");
"Sorry, this query was too complicated. Please rephrase and/or try again."

So I tried

NL:-Query("solve the differential equation y'(x)+y(x)=sin(x)");
"The differential equation given is a first order linear 

   ordinary differential equation. 

  

  The general solution can be obtained through the following 

   steps:

  

  1. Identify the homogeneous part of the equation, which is 

   y'(x) + y(x) = 0. The solution of such a homogeneous 

   equation known as the "complementary function" is y_c = 

   e^(-x) * A. where A is an arbitrary constant which will be 

   determined by a specific condition or boundary value.

  

  2. Find a Particular Integral (solution specific to the 

   nonhomogeneous part of the differential equation) which in 

   this case is y_p = -cos(x)

  

  3. Combine the Complementary function and Particular Integral 

   to get a general solution, y(x) = e^(-x) * A - cos(x).

  

  Now let's express the solution in MathML:"


                            (-x)          
                     y x = e     A - cos x

 "Note: Here A is a to-be-determined constant. If the problem 

    was a boundary value or initial value problem, you would 

    substitute the given values into this general solution and 

    solve it for A."


The solution should be

dsolve(diff(y(x),x)+y(x)=sin(x))

                y(x) = -cos(x)/2 + sin(x)/2 + exp(-x)*c__1

 

A blue triangle with white text

Description automatically generated

 

Attention Maple enthusiasts! It gives me great pleasure to announce Maple 2024! Maple 2024 brings together a collection of new features and enhancements carefully designed to enrich your mathematical explorations. Maple 2024 is the result of a lot of hard work by a lot of people, and there is far more in it than I can cover here. But I’d like to share with you some of my favorite features in this release.

 

AI Formula Assistant

The AI Formula Assistant in Maple 2024 is undoubtedly the feature that excites me the most, especially considering how often I’m asked the question: 'When will Maple include AI features?' This assistant serves as your new mathematical companion and will change the way you look up and enter formulas and equations. Driven by advanced AI technology, it presents a range of relevant options based on your search query. Alongside suggestions, you'll also receive detailed explanations for each formula and its parameters so you can select the one you need, and then you can insert the formula into your document at a click of a button, as a proper Maple expression.

A screenshot of a computer

Description automatically generated

 

 

NaturalLanguage Package

The Formula Assistant is built on top of the new NaturalLanguage package, which integrates powerful language models like GPT-4 and ChatGPT from OpenAI into Maple. With this feature, you can leverage large language models to process natural language within Maple. Ask the AI to explain concepts, provide additional details, find specific Maple commands, and more. Of course, since this is a Maple package, you can also use it as a basis to build your own AI-powered applications inside Maple. We’re really looking forward to seeing what you will do with it!

 

A close-up of a document

Description automatically generated

 

 

Argument Completion
We’ve had a lot of requests from people who wanted Maple’s command completion features to do even more, and I’m happy to say that Maple 2024 delivers. The new argument completion feature in Maple 2024 is poised to significantly enhance your experience with commands. For many users, including myself, not being aware of all the options a command takes is a challenge, often leading me to refer to help pages for clarification. With argument completion, that's no longer a concern. Just enter the command with the help of the existing command completion feature, then automatic argument completion takes over to guide you through the rest. Give it a try with the 'plot' command!

A screenshot of a computer

Description automatically generated

 

Check My Work

A personal favorite feature that's gotten even better in Maple 2024 is Check My Work. As someone who has tutored students, I vividly recall their stress before exams, often receiving emails and text messages from them seeking last-minute help. At the time, I found myself wishing the students had a way to check their work themselves, so we would all be less stressed! So I was super excited when we added the first Check My Work feature a couple of years ago, and am very happy that it gets better ever year. In Maple 2024, we’ve expanded its capabilities to support problems involving factoring, simplification, and limits.

A screenshot of a computer

Description automatically generated

Scrollable Matrices:
This feature will definitely resonate with many of the engineers in the Maple Primes community. If you're someone who works with worksheets containing large matrices, you've likely wished that you could scroll the matrices inside your document instead of having to launch a separate matrix browser. With Maple 2024, your wish has come true.

 

A white sheet with numbers and lines

Description automatically generated with medium confidence

 

Color Bars

And finally, for those of you who appreciated the addition of color bars in Maple 2023 but wanted to see them extended to more 2D and 3D plots, you'll be delighted to know that this is exactly what we’ve done. We’ve also added new customization options, providing you with greater control over appearance.

 

A close-up of a graph

Description automatically generated

 

This is just a partial glimpse of what's new in Maple 2024. For a comprehensive overview, visit What’s New in Maple 2024.

Any idea why parse("a", 'statement') doesn't return the value of the variable, but only its name?

Running the same command directly works.

Download ParseStatement.mw

Hello everyone!

I wanted maple to give me the conditions when my inequality is fulfilled. But maple gives me exactly the same conditions for x (x here as placeholder) >0 and x<0. That makes no sense. The conditions themselves for x>0 (x<0) are also contradictory and illogical. 

Can someone please explain the solutions or what is wrong? I assume that conditions for the inequality to be fulfilled are missing. But I wanted Maple to give me exactly these conditions. I always use the solve command for this.

Thank you very much!

Best wishes
Hahn 

Maple_Forum_Help_Inequalities.mw

I tried inserting contents of my worksheet here but for some reason procedure test2 does not appear. Therefore, here is a screenshot.

What I would like is for the call r() above to print out 3,2 and then 5.

Basically, I'd like to know how I can call a function that has default parameter values with a value that makes the function use the default parameter value.

In the code above, the variable r is assigned to the return value of test2, which is the function called "inner". The function inner accepts an argument "b" and calls the function "test" passing in this "b" as the second argument. If I don't pass any argument to "inner" then it defaults to Null, which then gets passed to "test".

I want this Null to force "test" to use its default value for parameter "b".

PS As an extra, why does it give a "not able to parse" error when we declare a local inside of a proc as above? Note that I have it commented out. 

Download Curry.mw

Hello

Beginning with a given real fraction, for example 1/12, I would like to find out the following information about its decimal number (here: 0.0833333...):

- decimal number up to period, here 0.08

- the period if exists, here 3

How to program that in Maple?

Thanks a lot for your help!

How 

5 6 7 8 9 10 11 Last Page 7 of 2097