Items tagged with calculation calculation Tagged Items Feed

Hi, I am completely new to Maple, and I need to use it to optimize my equations in order to make my PLC codes more compressed. I am calculating forward kinematics with the Denavit-Hartenberg method and as such I get long expressions. After a lot of google'ing and frustration, I thought I'd ask here in the hope that one of you might be able to assist me.

I have the following equations;

X := L10*cos(q5) - L16*(sin(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) - cos(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) - d2*(cos(q10)*(sin(q5)*sin(q8) - cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + sin(q10)*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)))) + L15*(sin(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + cos(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6))) - L11*cos(q5)*sin(q6) + d1*cos(q5)*cos(q6) - L13*sin(q5)*sin(q8) + L14*cos(q9)*(cos(q8)*sin(q5) + sin(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7))) + L13*cos(q8)*(cos(q5)*cos(q6)*cos(q7) - cos(q5)*sin(q6)*sin(q7)) - L14*sin(q9)*(cos(q5)*cos(q6)*sin(q7) + cos(q5)*cos(q7)*sin(q6)) + L12*cos(q5)*cos(q6)*cos(q7) - L12*cos(q5)*sin(q6)*sin(q7);

Y := L10*sin(q5) - L9 + L16*(sin(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) + d2*(cos(q10)*(cos(q5)*sin(q8) - cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) + sin(q10)*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)))) - L15*(sin(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - cos(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6))) + L13*cos(q5)*sin(q8) - L11*sin(q5)*sin(q6) + d1*cos(q6)*sin(q5) - L14*cos(q9)*(cos(q5)*cos(q8) + sin(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5))) - L13*cos(q8)*(sin(q5)*sin(q6)*sin(q7) - cos(q6)*cos(q7)*sin(q5)) - L14*sin(q9)*(cos(q6)*sin(q5)*sin(q7) + cos(q7)*sin(q5)*sin(q6)) + L12*cos(q6)*cos(q7)*sin(q5) - L12*sin(q5)*sin(q6)*sin(q7);

Z := L15*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L11*cos(q6) - L8 - d1*sin(q6) + L16*(cos(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - cos(q8)*sin(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - d2*(sin(q10)*(cos(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - sin(q8)*sin(q9)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) + cos(q8)*cos(q10)*(cos(q6)*sin(q7) + cos(q7)*sin(q6))) - L13*cos(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6)) - L14*sin(q9)*(cos(q6)*cos(q7) - sin(q6)*sin(q7)) - L12*cos(q6)*sin(q7) - L12*cos(q7)*sin(q6) - L14*cos(q9)*sin(q8)*(cos(q6)*sin(q7) + cos(q7)*sin(q6));


I need to optimize these equations, but still keep them separate. I would like to use mutual expressions for the calculations within, but still as I said keep the outputs of X, Y and Z separate.

This is MATLAB code.


Thanks in advance for any help.

Dear Community Members,


We have problem with calculation in Maple v11 and v18. when we make a calculation by using maple v11 and v18, we was not able to get the solution as you see enclosed. when we clicked to "enter + ; ", programme does not run.

1. for example how to convert decimal or integer number into base 3 number, base 5 number etc. to do logical operation with custom logic table for example,


120 special operator 235 




special operator according to logical table is

1st op 2nd op output
0 0 1
0 1 0
1 0 1
1 1 0




=00010100 = 20

Hello everybody

I am working on the bending of FGM plate, and I just used maple for the calculation functions of my problem of the bending of FGM plates.

Can any from the members of mapleprimes one help me to write Navier's equation include below for the bending of the plate because I am new in using Maple 18

alfa=m*pi/a, beta=n*pi/b with m=1,3,5..100 and n=1,3,5...100

Thank's for all 


I set a physical model for my reseach,

equ1 := x^4-5*x

equ2 := 1/x+x^2+3

x is a function of time t and it meets diff(x(t), t) = equi-equ2.

I want to plot the curve of x(t) varying with time

When I use the following command

DEplot({x(0) = 0, diff(x(t), t) = equi-equ2},x(t), t = 0 .. 20)   it shows: Error, (in DEtools/DEplot) called with too few arguments

Who can tell me what is wrong with my calculation? Thanks

Hi there,


I'd like to solve 7th order implicit simultaneous equation such as below, so I tried to do it by solve command.

However the calculation wasn't over although three hours passed.


eq1 := f1(a,b,c,d,e,f,g) = 0;

eq2 := f2(a,b,c,d,e,f,g) = 0;




eq7 := f7(a,b,c,d,e,f,g) = 0;


Just for your information, the eq1 and eq6 are written as follows specifically.

eq1 := -a-b-c-d-e-f-g+0.501857 = 0

eq6 := a*b*c*d*e*f+a*b*c*d*e*g+a*b*c*d*f*g+a*b*c*e*f*g+a*b*d*e*f*g+a*c*d*e*f*g+b*c*d*e*f*g+a*b*c*d*e+a*b*c*d*f+a*b*c*d*g+a*b*c*e*f+a*b*c*e*g+a*b*c*f*g+a*b*d*e*f+a*b*d*e*g+a*b*d*f*g+a*b*e*f*g+a*c*d*e*f+a*c*d*e*g+a*c*d*f*g+a*c*e*f*g+a*d*e*f*g+b*c*d*e*f+b*c*d*e*g+b*c*d*f*g+b*c*e*f*g+b*d*e*f*g+c*d*e*f*g-0.5281141885e-3+1.01894577*10^(-12)*I = 0


And the program code I used is:



Here is the specification of my computer.

OS: Windows 7 Enterprise 64bit

CPU: Intel Core i7-3520M 2.90 GHz

Memory: 4.00 GB


How can I handle this problem? Is the specification not enough to solve the equation? Do I need to leave my computer more and more time?

Any help would be appriciated.

Hello everybody,

I'm trying to solve for a challenging problem : a moving inclined plane with a block

I want to solve for the acceleration components for the block and the plane and the normal force acting on the block.

Let O=(0,0) be an external origin.

Let h be the upper left height of the inclined plane.

Let x1 be the x-position of the center of gravity of the inclined plane.

Let x2 be the x-postion of the center of gravity of the block.

Let y be the y-position of the center of gravity of the block.

Let m1 be the mass of the plane. Let m2 be the mass of the block.

Let  mu[1] be the coeffiction of kinetic friction between the bottom of the inclined plane and the level surface.

Let mu[2]  be the coeffiction of kinetic friction between the block and the upper surface of the inclined plane.

Let theta be the angle of the plane with the horizontal.

Let Fp a force applied to the inclined plane.


With those defined variables, I make two separable free body diagrams for the block and for the inclined plane, indicating all of the external forces acting on each. It then comes those two vectorial equations :

Block : m2a2=Wweight of block+Fplan acting on block+Ffriction from plan to block+Nnormal from plan to block

Plane : m1a1=Wweight of plane+Fpushing force+Fblock acting on plane+Ffriction from level to plan+Nnormal from level to plane+Ffriction from block to plane+Nnormal from block to plane

I am quite not sure whether I should include the Ffriction from block to plane and the Nnormal from block to plane into the plane's acceleration calculation. Am I right ?

I notice that from the geometry of the figure, I can write down the relation : tan(theta)=(h-y)/(x2-x1)

This implies the relation : -a2y=tan(theta)(a2x-a1x) (equation 1)

Writing down the equations for the x- and y- components of the accelerations of the block and of the plane , this yields :

( equation 2) : m2a2x=m1 sqrt(a1x2+a1y2) cos(theta) -    mu[2]  N1 sin(theta) +Ncos(theta


(equation 3) : m2a2y= m2g+m1 sqrt(a1x2+a1y2) sin(theta) +  mu[2]  N1 cos(theta) +Nsin(theta

(equation 4) : m1a1x=Fp - m2 sqrt(a2x2+a2y2)  sin(theta) +  mu[2]  N1 cos(theta) - Ncos(theta

(equation 5) : m1a1y=-m1g  - m2 sqrt(a2x2+a2y2)  cos(theta) - mu[1] N1 + N1 -  mu[2]  N1 sin(theta) -  mu[2]  N1 cos(theta)

Since N1=m1g,  equation 5 becomes : m1a1y= - m2 sqrt(a2x2+a2y2)  cos(theta)   -  mu[2]  N1 sin(theta) -  mu[2]  N1 cos(theta)

I am confused at this stage because a1y=0, that is to say, the plane remains at the ground level surface.

Where am I wrong ? Does this comes from my previous question ?


I want to solve this problem with Maple and plot the solutions. Thank you for any answer !


I  often find mself in the following quandry: I am investigating a problem, I do a few examples, run a do loop for j from1 to 5 to see if that works and then enter

for j from 1 to 200 do  a[j]:=blah, blah,...  end do:

and 15 minutes later nothing has happened. Is the loop finishing up with j = 198 or so or is it stuck at j = 23 and it will take forever to finish? Or perhaps there is an error that turns up for j > 23?

When I think about it I can insert a print(j) command to keep track of this but there are other situations where that doesn't work. For example,

Order := 35; mtaylor(....

When nothing happens is that because the calculation is almost done? or stuck? etc.

Is it possible to take a quick peek at the state of Maple and the decide whtether to continue the computation or abort? If the calculation of mtaylor(... is particularly long I might settle for the 15 coeficients computed so far rather than abort. Can I get at those?

Any advice?



Hi Everybody.


Doing some calculation in quantum mechanics, I stuble on that integral:

I see immediately that the answer is 1/2.  But Maple 18 cannot give an answer other than a limit that he cannot evaluate.  I even try assumption that p and hbar are realcons.  I get infinity.

Any idea?

Thank you in advance for your help.


Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : téléphone :  (819) 376-0987

Hi everybody,

I have never done statistics in Maple.  In a simple calculation, I need to calculate the RMS of 55 numbers.  The average of those numbers is 100484.3 and it is given that the RMS is 1.28 counts.  I have the a list of the 55 numbers.  Since I don't need a demonstration, it would help me a lot if you could tell me how to load the data from a *.txt file (one number per line), and use the appropriate commands to obtaine the result that is only given.

For the moment, I only need the steps to proceed with the calculations and how to do it in Maple.

Thank you very much in advance for your help.


Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : téléphone :  (819) 376-0987

Hi all


Please, I'd like to clarify some basic points about performing computations in Maple 18. Up to now I have been doing some numeric calcs using matrices normally composed of 10 to 15 columns and 200 to 600 rows.


When doing the calcs with a matrix of ~200 rows, it is just ok but as the number of rows increase the calculation speed reduces significantly.


The data contained in each row is calculated within a loop cycle (i.e.: for i from 1 to 200 do ......).


The number of rows is controlled by a slider so when I drag the slider the calcs are automatically updated and the results shown graphically.


As I said it is too slow so I don't know if I should be looking into the option of doing calcs symbolically first? However you can't use symbolic notation when working with matrices. I still got a lot of calcs to do but prefer not to continue as it will only get slower so better to see if I can optimise speed.


Any comment is trully appreciated.




how maple calculate exp(x) with e.g. 100000 decimal numbers

a divsion of the series x^k/k! with e.g. 1/25000!/25001 lasts longer than the exp(1.xx) calculation


is there a faster way to calculate exp(x) than with the x^k/k! series











Hi everyone,


At some point in my calculations, I want to do some simple manipulations wiht the use of the «clickable» features in M17.  For the moment, I can see directy how to do it by hand and I do it by copy-paste and use the mous to change it a little bit.  But I just cannot find a simple way to do it by simple click.


You will find in this attach question, the maipulations I want to do.  It is starting from equaiton (7).  Am I at the edge where it is simple by hand than with the features?


Thank you in advance.

Mario Lemelin
Maple 17.02 Ubuntu 13.10 - 64 bits
Maple 17 Win 7 - 64 bits messagerie : téléphone :  (819) 376-0987

Hi everybody,

When doing calculations, I often run in the following problem.  I have the final solution wich I simplify symbolically so many terms are cancelling.  But I get this:


While I would like to regroup all the terms into the square root.  But look, even in this forum, Maple get sqrt(2) automatically out of the square root.


I know that it is the simple form.  But in some instances, I need the square root to stay together so I can show a property.  But is there a way to be able, sometimes, to tell Maple to leave all the terms under the square root?

Thank you in advance for your help.


Mario Lemelin
Maple 17.01 Ubuntu 13.10 - 64 bits
Maple 17 Win 7 - 64 bits messagerie : téléphone :  (819) 376-0987

Hi everyone

I'm currently working on some mandate distribution using "Jefforson's Method" but I have run into some problems.

The general form of the calculations I do is as follows:

d:=fsolve(m = floor(v1/x)+floor(v2/x), x)

But in the case of m=5, v1=4969 and v2=208 it does not work. If I change v1 a bit it works as a charm but when 
4960=<v1=<4969 it does not.

Can any of you figure out why?


The equation surely has a solution (well, a lot of solutions). I can figure some out just by estimating and trying. Furthermore, wolfram alpha easily gives me several solutions:

So how come I cannot get Maple to solve it?


Thanks in advance!

1 2 3 4 5 6 7 Last Page 1 of 18