Product Tips & Techniques

Tips and Tricks on how to get the most about Maple and MapleSim

Maple Equation

Ref: Kahan (Jan 2007): How Futile are Mindless Assessments of Roundoff in Floating-Point Computation ?

I wanted to know, how Maple behaves on the example given in \2475 of that working paper (where other

systems are considered, mostly Matlab) and thought it might be of interest here in the forum.

> restart; Digits:=16; interface(version);

( 1+ c*10^(n+1) ) / ( 1+ c*10^(n) ): 'limit(%,n=infinity)': '%'=%;

                                        (n + 1)
                                1 + c 10
                      lim       --------------- = 10
                 n -> infinity             n
                                   1 + c 10

However if c = 0 then ...

Hello, I have a question about Mathematical Expression Component in document. I tried to use it in my maple document and of course I looked at the help about it. There is a discription about another component, I think. The reason of it is that the dialog of component property is different in a help and in a document. I do not know why. I try to use it in Maple 10.06. The following figures show the situation. Of course, problem of this component is not only in different property dialog but also in functionality. Figure from help Figure from document Problem with this component is described also in the document here. Thank you. Vladimir

restart; interface(version);

  Classic Worksheet Interface, Maple 10.06, Windows, Oct 2 2006 Build ID 255401


expr:=hypergeom([1-I*a,1-I*b],[1],x);
convert(expr, hypergeom, "lower c");

            expr := hypergeom([1 - a I, 1 - b I], [1], x)

                                  0

Digits:=14:
subs(a=1, b=2, c=1, expr):
eval(%,x=2); evalf(%);
#Re(%%%); plot( %, x=-1..0.9); plot( %%, x=1.1 .. 3);

                 hypergeom([1 - I, 1 - 2 I], [1], 2)

               0.010385802579659 + 0.068521539093061 I

I have a questing about using Maple document components, such as a plotter, a slider and a Math expression to display my own function that is inserted via Math Expression component. The inserted function (of variable x) is multiply by parametr a and then is displayed in Plotter0. Situation in Maple document is displayed in the following figure The code of Slider0 components is the folowing: a:=GetProperty( 'Slider0', 'value'); b:=MathML[Import](GetProperty('MathContainer0', 'value')); SetProperty( 'Plot0', 'value', plot(a*b,x=-5..5) ); When my function is a polynom and it is not included any other function such as sin, cos, etc., everything workes correctly. But when I try to display e.g. sin(x) it does not worked - it is an empty plot or the other message is generated. I think that it is because of Import function is not able to evaluate it correctly. Could you help me,please? Thank you Vladimir

I would expect, that evalhf works for that without 'manual' translation ...

restart;
interface(version);

  Classic Worksheet Interface, Maple 10.06, Windows, Oct 2 2006 Build ID 255401


tst1:=proc(a,z) (-z)^(-a); end proc:
evalhf(tst1(1.5, 2.5));

  Error, fractional power of a negative


'(-z)^(-a)': '%'= convert(%,exp);
 
tst2:=proc(a,z) exp(-a*ln(-z)); end proc:
evalhf(tst2(1.5, 2.5));

                          (-a)
                      (-z)     = exp(-ln(-z) a)

                                 -9
          0.155662521299999988 10   + 0.252982212799999995 I
I have a text file, named Gens.txt, in the followig format Heading1 : This is first line Heading2 : This is second line Heading3 : This is third line I want to write a code which does the following: 1. Reads a line from this file and substitutes the number of prefix spaces at the start of line and followed by #. 2. The portion after : is made uniform in terms of spaces i.e. each word is followed by only one space. 3. The line thus produced is to be written to a text file named GensByMaple.txt. For example the first two lines would become like the following:
Should penguins wear coats at these times? - Yes ... but please ... those shoes ... Can we have recipes for fine French meals? - Yes ... and include canteen food! How about everything but Maple stuff here? - Yes, that's the primal intention ... Must one clutter up this board? Hm ... Seems to be 'Le Must' ... Lehalle, please stop your nonsense postings, the tracker shows all of this flood. Regards, Axel
It is possible to pass to a procedure a name which will be used to name a geometric object.

> with(geometry):

> f:=proc(n, x,y); point(n, x,y); end proc;

> f('A', 1, 1);

So you think you really want to know what Maple does? Are you really sure? Well, here is how old-timers do it. [I do not claim that this is either the best or the modern way to do it, just that this is how people with over 10 years of Maple experience do it].

I want to use dsolve (Maple 10) to iteratively solve two systems of ODEs adjusting the boundary conditions until the solutions match at a fitting point. My problem is that the output of dsolve is a set of functions, and, each time dsolve is called, the solutions might not be reported in the same order as the last time dsolve was called. This makes it difficult to write a routine that compares the results of each iteration. I would appreciate any advice on how to extract the solutions from the dsolve output. Thanks. Glenn
A few years ago I saw somewhere in a math forum a brain-teaser type problem which I'm about to present. I wasn't able to solve it at the time. I haven't been able to find the original forum, so I don't know whether or not my answer is right. I do know that I could never have attacked the problem without MAPLE. We have a cube of edge a and a drill bit of diameter b. We drill one hole from the center of the front face to the center of the back face, and another from the center of the right face to the center of the left. What is the total volume of material removed? I get (Pi*(b^2)*a)/2 - ((2/3)*b^3) Am I right?
Playing with numerics for the hypergeometric function 2F1 i stumbled into the following exactness stuff, where lots of digits are lost and one needs to increase working precision quite a lot to get a good answer: f1 and f2 result from evaluating ugly, but usual transcendent functions, f3 comes through high precision and f0 is the limiting case.
  restart;
  
  hypergeom([1,2+epsilon],[3],z): 
  '%' = simplify(convert(%,StandardFunctions));
  theSol1:=rhs(%): 
  
  theSol1 = -2*(z*(1-z)^epsilon*epsilon-1+(1-z)^epsilon)/
    z^2/((1-z)^epsilon)/epsilon/(1+epsilon);
  is(%);
Maple, Mathematica, and many other CAS define indefinite integral up to piecewise constants. That means, in particular, that the integral of a continuous function can be discontinuous. In many cases that can be easily fixed, such as for integrals involving floor(x) and frac(x). However, it has not been done neither in Maple nor in Mathematica. Here is another example, suggested by David W. Cantrell
int(1/(2+cos(x)),x);

               2/3*3^(1/2)*arctan(1/3*tan(1/2*x)*3^(1/2))
First 55 56 57 58 59 60 61 Last Page 57 of 65