2165 Reputation

19 Badges

4 years, 252 days

MaplePrimes Activity

These are replies submitted by C_R

If you want to keep the symbols try

interface(imaginaryunit = i);


Could you solve the integral?

@acer Originally my intention was to show equality with commands instead of disassembling expressions (with op()) and showing equality manually component wise. In failing on that task, I realized that even manual is not straight forward.
That’s why I was asking for advise on the follow-up example -sqrt(r^2-1)/(r-1). Retrospectively, I should have asked much earlier. This simple example is very instructive and shows why Maple sometimes does not simplify. Thank you for taking the time and sharing many techniques that were new to me!!!

@acer  Even my not performing assumption 0<r<1 finally worked in a 1-line statement. As originally intended, I could make it work in an expression where rhs-lhs is not an option. 

Ei(sqrt(r+1)*sqrt(1/(r-1))) = Ei(-sqrt(r^2-1)/(r-1))

Ei((r+1)^(1/2)*(1/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1))


`assuming`([is(Ei((r+1)^(1/2)*(1/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1)))], [r > 0, r < 1])



`assuming`([combine(Ei((r+1)^(1/2)*(1/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1)))], [r > -1])

Ei(((r+1)/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1))


`assuming`([is(Ei(((r+1)/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1)))], [r > 0, r < 1])



`assuming`([(`@`(is, combine))(Ei((r+1)^(1/2)*(1/(r-1))^(1/2)) = Ei(-(r^2-1)^(1/2)/(r-1)))], [0 < r and r < 1])




I am unsure what conclusion to draw from the answers. It seems to me that r>0, r<1 works in some instances better. Is it advisable to write assumptions always as a sequence of simple relations and stop using 0<r<1? Is the order in the sequence of importance? And finally, is there a difference between separate commands and nested commands?

If there are no simple answer for these questions I will wait until the next time that I discover a rare species 🦋

Thank you again!

Download Simplify_exp_with_roots_02.mw

@Kitonum An assumption over a larger range that leads to inequality for r>1 simplifies as intended whereas the more restrictive assumption respecting equality does not ‽ ‽ ‽

Why is that?

And, if I may ask: Is there another command (with appropriate assumptions) that can do the simplification on the right:

(The one in the middle is easy using factor.)

Thank you!

@Thomas Richard


From the parameter block select and than copy (Ctrl-c) the contents of the parameter L__p.

Draw a text box (with the Text tool from the drawing tools), type some characters and try to paste it in the text box with Crtl-v. Nothing is pasted this time. Not even the math xmls string as orginally described.

Pasting in a Worddokument or in another parameter cell works.

Thanks for following up on this.

@Carl Love Amazing and more to ask. It's worth following up on this in a separate post if I can't figure out how to create symbols myself.

&#128077 👍

@Carl Love 

If there was a Maple symbol for amazement, I would have pasted it here!

Your examples are worth 3 interobangs or stated differently




Yes indeed, this is very interesting and helpful context information. Maples (in my opinion) clean syntax combined with little information in the help system raised my interest and some questions. Most of them have been answered. I still think its worth giving a nameless procedure at least an official term. How to ask a question if you can’t name it?

Thank you again!

@acer This is exactly what I was looking for. Thank you!


Actually, I was looking for an identity operator. A command that repeats an expression without further manipulation. I would have searched differently if I had guessed the appropriate search term “identity” in Acers response beforehand. Eval (in this may be too simplified example) was the first command that worked to illustrate a use case.

Instead of a better requirement I can at least give some motivating background:  

By personal preference I try to avoid the assignment operator wherever possible. This is mainly for better readability of Maple Documents for non Maple users. An equation is easier to understand than several lines of code. So, if it was only for the output in my example the input (1)=value((1)) would have been equally compact. What I like about the ()() construct is that it separates commands grouped in the first pair of parathesis from the expression in the second pair of parenthesis. Reuse of such a construct on other expressions is easier: Only one instance of the expression must be exchanged.  As in this example:





Three instances of (1)

-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)) = simplify(expand(numer(-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1))))/expand(denom(-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)))))

-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)) = (x^3+2)/(2*x^4+2*x)


One instance of (1)

` `


((proc (x) options operator, arrow; x end proc) = `@`(simplify, (`@`(expand, numer))/(`@`(expand, denom))))(-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)))

-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)) = (x^3+2)/(2*x^4+2*x)


Function to display equality of an expression to the simplified version of the expression (without the need to involve proc statement).

simplify_expanded := proc (x) options operator, arrow; ((proc (x) options operator, arrow; x end proc) = `@`(simplify, (`@`(expand, numer))/(`@`(expand, denom))))(x) end proc

proc (x) options operator, arrow; ((proc (x) options operator, arrow; x end proc) = `@`(simplify, (`@`(expand, numer))/(`@`(expand, denom))))(x) end proc



-2*(x^3+2)/(x*(x+1)*(I*3^(1/2)+2*x-1)*(I*3^(1/2)-2*x+1)) = (x^3+2)/(2*x^4+2*x)



Download simplify_expanded.mw

@acer Thank you very much for the detailed explanations. Very much appreciated!

@acer I remembered that there is this handwriting pallet

However, the output is not so nice as yours since it puts brackets arround the left and right hand side (see attached). Can these brackets be removed?

Your solution surprised me because it contains a comment symbol (#) and a statement separator (;) a within left quotes. The pallet symbol I found uses a neutral operator (&). It is not clear to me what they exactly do. Is there a help page explaining the function of such characters within left single quotes?  

Thank you!


(updated comment)

…I did not know (and was looking for years)! Very interesting solutions without decomposing and reassembling of expressions, which is error prone and not elegant.
Also good: no assumptions required.
Not so good: Intuitively I would not have looked for an expansion option to make an expression shorter. As in the example, I would have tried (and abandoned) it the same way.

Two questions remain:

Why can’t simplify/size shorten such expressions?

And to make the numer/denom operation dispensable: Why does expand only work on polynomials but not on ratios of polynomials?

I think there is potential for improvement.

@ousshajjaj You got feedback form an expert!

I would be interested to see your finshed model here.

One hint on the Stuart platform: if you want to inspect the full model in 3d worksspace you have to disable the visualisation components in the Subsystem Leg. Otherwise you will only see only leg. With one leg the modeling approach is less obvious.

With the approach from Orang you probably don't need to consult the 3d workspace. With my proposal you most likely have to.

Good look with your project!

Key to solve your problem will be the creation of 3d assemblies for the elements “couland” and “noix” in your drawing. These elements will define the 8 kinematic loops (!) of your problem.

Thinking about this I have no idea how this can be done best. This would be the perfect moment for an experienced user or MapleSim support to jump in with some advice.

Or, maybe someone knows a model in the model gallery where you can learn from. Straight away I can only suggest the Stewart platform https://de.maplesoft.com/products/maplesim/modelgallery/detail.aspx?id=34

This example does not use 3d assemblies as I have proposed above. The orientation of the legs is done implicitly withinin the legs. This is an extremely smart and efficient way of doing it but requires expert knowledge and allot of experience.  That’s why I was proposing an engineering approach using 3d subassemblies (of ridig body frames).

Please take my advice as an educated guess from someone how has been in the same situation looking for training material on building 3d assemblies (planar is simple) or some general good practice on building 3d assemblies (or at least things you should not do). I hope my approach is a not a "solution looking for problems".

So again: Can someone come up with some better advice?

First 35 36 37 38 39 40 41 Page 37 of 41