Items tagged with maple maple Tagged Items Feed

I took a calculus 1 class in 2002, so i have many maple worksheets i would like to view on my new dell venue 8 pro. can the player read the .mws ext ?  Donald Altringer

ps. I have maple 8 on my laptop but not on th tablet and i don't  have a way of installing it



Dear all


Please I need your help to simplify by the coefficient a in this Matrix

I have The matrix A defined by  A:=Matrix(2,2, [[a,a],[3*a,4*a]]);

I want with maple transform A to  A:=a*Matrix(2,2, [[1,1],[3,4]]);

Thanks for your Help.


I have tried to use Maple to solve ordinary differential equations but i have this error. Could you please help me to fix this problem

> eq1 := diff(v1(t), t) = v2(t);
> eq2 := diff(v2(t), t) = -v1(t)+(3*(v1(t)^2-1))*v2(t);
> init1 := v1(0) = 2;
> init2 := v2(0) = 0;
> with(DEtools);
> DEplot({eq1, eq2}, [v1(t), v2(t)], 0 .. 3*Pi, {[0, 0, 0]}, scene = [v1, v2], stepsize = .1);

Error, (in DEtools/DEplot/direction) division by zero


thank you

How can I typeset this in Maple? A ket with a 2 element column vector in it, but without the vector brakets. Like this:

| x over y >





Hello everyone!

I have a question that I can't seem to find a straight answer to. I need to fit a circle to a collection of points that a circular in nature. I was trying to use the following elliptical least squares fit, but I can't determine what I should be minimizing.

Here's the page:


For an ellipse, I used the general conic:


I minimize using:



What would I use for a circle? Or is there a better way for a circle?

I have a procedure I need to place Inline and am not sure how to do this. 



I have some data:

Matrix(10, 2, {(1, 1) = 0, (1, 2) = 0, (2, 1) = .5, (2, 2) = 3.25, (3, 1) = 1.0, (3, 2) = 5.82, (4, 1) = 1.5, (4, 2) = 7.50, (5, 1) = 2.0, (5, 2) = 8.79, (6, 1) = 2.5, (6, 2) = 9.83, (7, 1) = 3.0, (7, 2) = 10.66, (8, 1) = 3.5, (8, 2) = 11.35, (9, 1) = 4.0, (9, 2) = 11.94, (10, 1) = 4.5, (10, 2) = 12.46})


I want Maple to make a trendline fitting a Logarithmic function. I can make it output some function with this:

LeastSquares(`<,>`(.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs:



But please notice, the dataset in the function does not have the first 0 and 0. If i do that:

LeastSquares(`<,>`(0, .5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5), `<,>`(0, 3.25, 5.82, 7.50, 8.79, 9.83, 10.66, 11.35, 11.94, 12.46), x, curve = a+b*ln(x))

It outputs: 

Error, (in Matrix) numeric exception: division by zero


Besides that, i need the R-squard value for determinating how well it fits.


If i do the same thing i Excel the data set will give a formular: 5.5464ln(x)-0.2175 with a R-sward value of 0.9985.


How can i do this i maple?


Thanks in Advance!



Emil Kristensen

Maple help me please...

March 09 2014 c4meleon 15

can you please help me solve that?
I want to write maple procedure that checks if a number is prime or not and I need to do it so that it doesn`t take forever to give an answer.
I wrote a procedure that works good with small numbers but when I put bigger numbers eg.9999971 it is taking far too long (5min) to get the answer, I tried to modify it and I think I find out something that could be modified to make it more efficient, like for example in the line:   for j from 2 to n-1 do     (I changed it to: ) for j from 2 to n-1  by n do    - it tooks 9.953 second to get the answer   (or I changed it to: ) for j from 2 to (n-1)/2  do   - it tooks 262.062 second I also tried many things and I always get an answer after long time excepte when I changed the line to for j from 2 to (n-1)/n  do   - it tooks 0 second but I didn't find any explanation why should I devide it by n as j from 2 to ((n-1)/n) = 1-(1/n) which is less than 2 as it make no sence....
But it still not efficient enough, because if for example I use the maple command isprime,then I got the result in less than 1 second.
In the program I used other procedure that I think will make it quicker which is a floor function procedure. please see bellow :  

> flr:=proc(a,b)

      local n:


      while a>=b*(n+1) do






> Isprime:=proc(n)        

         local j, p:      


         if n=2 then



             for j from 2 to n-1 do 

                  if (n/j-flr(n,j))=0 then












                                                                    309.558, second


Please reply and thank you in advance



so we have to Write a maple function with -> that takes an integer N and a boolean function

F: {(i,j) l 0<= i,j<= N} -> {true,false} 

and returns a list containing all [i,j] such that F(i,j). A procedure that does this
would be

proc(N,F) local i, j, RV;
for i from 1 to N do for j from 1 to N do
if F(i,j) then RV:=RV,[i,j] ; end if ;
end do ; end do ;
return RV ;
end proc ;

The problem is to do this inline, i.e. you have to write
(i,j)-> ...


please help...

Thank you for your help with this question. I found what I was looking for. 

This is one of these silly ones that crop up every-so-often (and yes, beta, gamma are just the relativistic v/c and energy):


comes up with ±I*sqrt(-gamma^2+1)/gamma.

While this is not wrong it is nothing I want to throw at any student trying hard enough as it is to keep his/her head above water. What I want is beta=sqrt(1-1/gamma^2) and I am having a devil of a time getting Maple to do this. even doing it "by hand" the I comes in the moment I take the sqrt. "assuming" does not help (and when I try ...assuming beta::positive, gamma > 1 I get an error claiming these to be inconsistent).

What gives?

Mac Dude


I have a 4-D function that I have found an analytic expression for in Maple, but I want to generate a numerical 4-D array, which I can export for use in Matlab. However, I don't think I'm using a very good solution, because it is extremely slow (several minutes for even 10x10x10x10 elements). My code is

A:=Array(1..NumElements,1..NumElements,1..NumElements,1..NumElements,[seq([seq([seq([seq(evalf(rho(ws1,ws2,ws1p,ws2p)),ws2p=-NumRange..NumRange,dx)],ws1p=-NumRange..NumRange,dx)],ws2=-NumRange..NumRange,dx)] , ws1=-NumRange..NumRange,dx)],datatype=float);

Rho is an exponential with 10 terms in the exponents.

I also tried using four for-loops but that was even slower!

Thanks for any input

I really do not want to click on hundreds of pages here in order to figure what new functions  there are in Maple 18. Even when clicking on these pages and following the links, it is hard to collect and enumerate what the new functions are and one gets lost in the processes. It seems all marketing material.

Any one knows a page that lists these new functions all in one place? It will be nice if there is a list of new functions/packages and list of modified functions in Maple 18.

Trying to find what new functions or modified functions in Maple is not easy.




I wish to be able to calculate the roots of the function f(p) by using the roots of the function h(p) and applying the bisection method due to the fact that the roots of h(p) bracket the roots of f(p) as can be seen in the graph below. I have done this before for another example when h:=J0(p); and hence i could use The commands BesselJZeros(0,n)/BesselJZzeros(0,n+1) to find the roots. So my problem arises with the finding the roots of h(p) and how to insert them into my bisection loop(underlined below).

Any advice would amazing. Many thanks


Digits := 30:
with (plots):

#Define given parameters

R:=1: #external radius of particles, cm

d:=10^(-3): #diffusivity cm^2 per second

alpha:= 1: #fractional void volume

c0:=10^(-6): #concentartion of soltion in void volume of solid initially, moles per liter

C0:=0: #concentration of main body of solution initially, moles per liter

k1:=0.5: #constant in adsorption isotherm (ka)

k2:=0.75: #constant in adsorption isotherm (kd)

k:=2.5: #equilbrium constant for adsorption kinetics

n0:=(k1/k2)*c0:#initial amount absrobed on solid, moles per liter

V:=0.1: #volume of external solution, liters

W:=0.1: #weight of absorbant, grams

rho:=2.0: #solid aparrant density, g/cc












f:=p->(BesselJ(0,R*sqrt(-delta*p))*k*p-(R*sqrt(-delta*p))*BesselJ(1,R*sqrt(-delta*p))*(d*p/R + 2*beta*k/(R^2)));

proc (p) options operator, arrow; BesselJ(0, R*sqrt(-delta*p))*k*p-R*sqrt(-delta*p)*BesselJ(1, R*sqrt(-delta*p))*(d*p/R+2*beta*k/R^2) end proc




proc (p) options operator, arrow; BesselJ(0, R*sqrt(-delta*p)) end proc





rts:= Array(1..points):
for n from 1 by +1 to points do
pl:=evalf(#**first root of h**);
pu:=evalf(#**second root of h, i.e n+1 root**);
pe:= (pl+pu)/2;
while abs(f(pe))>10^(-6) do
if f(pu)*f(pe) <0 then
elif f(pl)*f(pe)<0 then
end if;







Hello there,

i got a question regarding derivatives in Matlab.


I got a function for a example:



from this function i need the partial derivatives with respect to x and y, i can easily get them with




now i want to compute the derivative of f with respect to time t, assuming that y and x both depend on t - how can i tell maple that y and x depend on t?




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