We use maple to generate all of our computational bits, dump this out to header files, and include this in our code base. A lot of the code that is generated is redundant so it would be nice to have codegen[C] know, or at least be able to be told, to optimize the entire code being dumped to the same header file. Is this possible? Examples follow...
"
.....
DCb := array(1..3):
lp:='lp':ip:='ip':m:='m':ap:='ap':jp:='jp':a:='a':l:='l':j:='j':i:='i':k:='k':kp:='kp':
for ip from 1 to 3 do
DCb[ip] := sum(sum(sum(sum(sum(gd[ip,jp]*gu[ap,lp]*jacu[m,lp]*jacu[a,ap]*dJ[jp,m,a],m=1..3),jp=1..3),lp=1..3),ap=1..3),a=1..3):
Ok I am new to Maple and can't seem to get anything right with it. I am taking trigonometry online (big mistake) is killing me. I need help with problems like this: Find all solutions of the equation 2 sin(2x)=sqrt(3) in the interval [0,2π]. Can any one help?
How do I animate a sinus function between 0 and PI along an axis to simulate a travelling wave?
I would greatly appreciate any help.
Hi all,
I'm sure this is very simple - but I simply can't figure out how to do it - and I can't find any information on it. I have an equation which has been integrated and that's all wondering. However, I would like the equation to be outputted on a single line so I can copy from one window and paste it into another. As it stands Maple displays the equation over several lines so I can't do this. I could of course retype it - but its rather complex and I'd rather have the equation that Maple outputs so I know there isn't a mistake I've introduced.
For what I can tell this is Maple's 2d maths display, which is default. I can see how to change it in a gui version of Maple, however, I don't have access to a gui version - its command line on linux... Its Maple 10 as well if that helps at all.
Hi folks,
I'm using the IntegralTools(Change) function to change the variables of integration in a double integral to lower the order of a polynomial under a radical prior to integration (praise to Axel!). The result contains exponents under the radical and in the limits of integration that seem to defy Maple's numerical integration routines. (Sorry for not using HTML! I tried to present in 2D math, but the preview post omitted the math entirely. Just paste it into a worksheet to convert this text mess into a mathematical one.)
Int(70871722182849/100000000000000000*Int((20.6066600725-0.164853280580e-1*sqrt(1.562500*(RealDomain[`^`])(10, 6)+7.58249999999*(RealDomain[`^`])(10, 6)*(RealDomain[`^`])(xi[2], 99999999999999939/100000000000000000)-3.35631780000*(RealDomain[`^`])(10, 7)*(RealDomain[`^`])(xi[1], .10000000000000)*(RealDomain[`^`])(xi[2], 99999999999999939/100000000000000000)+9.19908900000*(RealDomain[`^`])(10, 6)*(RealDomain[`^`])(xi[1], .20000000000000)+9.19908899998*(RealDomain[`^`])(10, 6)*(RealDomain[`^`])(xi[2], 99999999999999939/50000000000000000)+7.58250000000*(RealDomain[`^`])(10, 6)*(RealDomain[`^`])(xi[1], .10000000000000))+50.0000000000*(RealDomain[`^`])(xi[1], .10000000000000)+50.0000000000*(RealDomain[`^`])(xi[2], 99999999999999939/100000000000000000))*(RealDomain[`^`])(xi[2], 0.70163004961021e-1), xi[1] = (RealDomain[`^`])(c, 1000) .. (RealDomain[`^`])(d, 1000))/(RealDomain[`^`])(xi[2], 99929128277817151/100000000000000000), xi[2] = (RealDomain[`^`])(a, 100000000000000000/70871722182849) .. (RealDomain[`^`])(b, 100000000000000000/70871722182849))
Our's is a large I.T training organisation we are looking for I.T Professionals who can create worksheets through Maple 10.Familiarity with the mathematics module will be an added advantage.
The requirement is quite urgent if anyone interested or knows anyone who is interested please contact ASAP.
I am trying to export the animated gif generated by this maple code:
It exports the animated gif with a gray background. How can I get a white background?
Thanks
Hello all,
I have a question about numerical integration in Maple. I have an equation (a PDF) which I need a numerical answer from as Maple can't find a closed form solution (which isn't too surprising given the equation in question). Anyway, the equation has several parameters which are varied and the equation looped over. That's no problem, and generally Maple will find a numerical solution to the problem. However, towards the extreme value case I get error messages basically saying Maple hasn't found a numerical result.
The equation giving the error is:
-20.01782577 I exp(-490.0000000 - 50. x) (-0.1625801243 10^212 I + erf(0.2258769757 I (9801. + 980. x)^1/2 - 0.2258769757 I)) dx
When doing an implicit plot recently, I ended up with a whole large triangle which was completely tessellated with much smaller triangles. The checking of other graphs and numerical data of the function in this region, it was very clear that the implicit function should be a well defined line in this region.
Further look at the code for implicitplot() indicated that, after some setup work, it ultimately called exactly the same routine (`plot/iplot2d`()) as plots[contourplot]() with the option "contours=[0]" to do the actual calculations. I then discovered that when I called contourplot() directly with the "contours=[0]" option I got a correct implicit curve consistent with my other data and with no tessellations.
As currently programmed, fsolve() does not do numerical derivatives for systems of equations. The reason for this is that subs() is used instead of eval() when evaluating derivatives. [Note: jacob is the symbolically defined jacobian of the system of equations and lsub is the sequence of appropriate numerical substitutions (not the "list" of substitutions the mnemonic might suggest).] The original statement (in `fsolve/sysnewton`) is:
A:=traperror(evalf(subs(lsub,jacob),Digits-5+n));
The functions evalf() and subs() apparently do no know how to work together to produce numerical derivatives. However, the following statement does work.
Maple displays a defined procedure (yours or Maple's)as output when you enter definition or when you execute eval(). It should be noticed that in either case, Maple uses its own well defined indention scheme, regardless of what indention scheme you used or didn't use when you input the procedure.
Now if you want to edit the procedure, and your only copy is gotten by copying Maple's output to an input line, you will have to deal with Maple's hidden indention characters at the beginning of each line. I have been unable to find any Help material on this, and, in particular, I have not been able to find any way to edit (delete or input) these characters directly. However, they are all invisibly located in the blank space, which is visible, at the start of each indented line. The code seems to be of the form "indent a fixed number of spaces more than the previous line". These fixed numbers are one of three values, a positive number (approx. 3), 0, or a negative number (approx. -3).
As most of you have probably experienced, even Maple 10.4 in standard 2D Maple input has some strange editing behavior. Most of it is of the variety of "What you see is Not what you get". There are two basic kinds of things that can happen: (a)You get strange errors that seem impossible from the code that you can see, such as "missing operation" or "object used as name" or even "non-matching delimiters"; and (2) Your editing action happens much further away or much more extensively than your cursor position or highlighting would indicate.
This apparently happens because Maple is creating a parsing structure on the fly behind what you are editing and not visible to you. When some incomprehensible errors happen or Maple seemingly does not want to allow you to edit what you see is wrong, sometimes the only remedy is to retype whole blocks of code (possibly creating other errors in the process requiring the same cure, etc., etc.). Till Maple can supply us with a structural viewer that would allow us to easily find and correct such problems, I want to pass along some tips I have learned in my frustration.
I kept seeing in the help pages for linalg that it is being superseded by LinearAlgebra, so I have tried to work with LinearAlgebra. However, it turns out that LinearAlgebra is very clumsy and annoying for symbolic computations.
LinearAlgebra was clearly meant to be a numerical calculation package. Unfortunately, the desiderata for numerical calculations are not the same as for symbolic calculations.
The main feature of LinearAlgebra which causes this clumsiness is the requirement that all elements of a Matrix be defined. To do symbolic calculations this means assigning a symbol to use with an index for the undefined elements of the Matrix. The name of this symbol has to be different from that of the Matrix itself, and the indexed symbol is not an array or a table or a Matrix. Already then you have two names for essentially the same thing. ==> First Problem. Now, lets say you do some calculations with these Matrices and end up with expressions that that contain the indexed symbolic names. To assign other values to these indexed symbolic names in the resulting expressions, you have to assign the indexed symbolic names new values and you cannot use matrix operations for that since these indexed symbolic names are not arrays or Matrices or even tables. ==> Second Problem. Now if you want to unassign the symbolic names again or assign new values and have these values show up in the original Matrices, you have to reassign the symbolic names and reassign the values in the original Matrices. (Matrix elements cannot be unassigned.) In other words, do the job twice. ==> Third Problem.
There is a general problem which arises when one uses assume() that can be quite confusing. I seems that once an x~ is passed on by assigning a data structure containing it to another name, it becomes an entity on its own, a sort of vintage x~, with no connection back to the original variable on which the assumptions were made. It has no unique name and no way to access it for manipulation or redefinition. The code x:='x' does not affect these vintage x~'s. Even the function addionally() does not affect these vintage x~'s. Thus one can have a whole set of x~'s of different vintage in one's data structures with no way to tell them apart or manipulate them. This has tied some of my codes in knots before I realized what was happening. It would be so much less frustrating if each new vintage received a unique name that could be referenced by the user.
I have seen a number of forum questions concerning showing students the steps in a problem. There seems to be some confusion about how to do this reliabley and easily.
A method I have found useful is seen below: