MaplePrimes Questions

Hi everybody,

I use the Grid package to do intensive computations.

For some reason I'm ignorant about, the test case described in the Grid[Server][StartServer] 

 help page doesn't work with Maple 2015 (neither on Mac OS X, neither on Windows 7 ; here is the mw file run on MAC Os X)

Could someone explain me why (probably something I did not read with enough attention ... some license maybe) ?
Thanks in advance

GridServer.mw

I need to calculate sum w2(x,y),

v2 := proc (x, y) options operator, arrow; sin(x)*cos(y) end proc;
u2 := proc (x, y) options operator, arrow; 3*sin(x)-cos(y) end proc;
w2 := proc (x, y) options operator, arrow; diff(v2(x, y), x)-(diff(u2(x, y), y)) end proc;
L1 := proc (x, y) option inline; abs(w2(x, y)) end proc; CodeTools:-Usage(evalhf(add(add(abs(w2(x, y)), x = 0 .. 10), y = 0 .. 10)));
Error, (in CodeTools:-Usage) unable to evaluate built-in function `diff` in evalhf

 but it is error , how  can be rewritten properly?

 

I created the following plot

plot([BesselJ(0, x), BesselJ(1, x)], x = 0 .. 10, color = [red, blue]);
 

What I want to do mext is calculate all x values on this interval wherethe two paths intersect

 Calculate all x values on this interval where

I have a question as this:

Examples as following:(come from MAPLE‘s help ) 
with(LinearAlgebra);
Ax := <1.00004, 1.99987, -0.12e-3>;
b := <1., 2., 0.>;
Add(Ax, b, 1, -1);

result is this:[0.400000000000400e-4, -0.129999999999963e-3, -0.120000000000000e-3]'

I think result is :[0.400000000000400e-4, -0.13e-3, -0.120000000000000e-3]' 

Is this a bug of MAPLE?



 

I am trying to solve the function


f :=  sqrt(1-x2)
L := int(sqrt(1+(diff(f(x), x))2), x = 0 .. 5)

Maple is returning an answer with Pi:  (1/2)*Pi+I*ln(5+2*sqrt(6))

How do I convert this into a numerical format?  

 

 

Dear Friends
Is there a way to solve a complicated integration in less possible time?

Thanks

_________________________________________________________________________________
 

restart;
Digits := 100:
tm := time():
with(LinearAlgebra):

m := 6:
a := 0.1:
b := 10*a:
E := 1:
h := 1:
nu := 0.3:

w := (r-b)^2*(r-a)^2*add(add(W[n, i]*r^n*t^(i-n), n = 0 .. i), i = 0 .. m):
ur := -z*(diff(w, r)):
ut := -z*(diff(w, t))/r:
er := diff(ur, r)+(1/2)*(diff(w, r))^2:
et := ur/r+(diff(ut, t))/r+(diff(w, t))^2/(2*r^2):
grt := diff(ut, r)-ut/r+(diff(ur, t))/r+(diff(diff(w, t), r))/r:
u := -(1/2)*E*(2*er*et*nu+er^2+et^2)/(nu^2-1)+(1/2)*E*grt^2/(2*(1+nu)):

PI := int(int(int(u*r, z = -(1/2)*h .. (1/2)*h), t = 0 .. 2*Pi), r = a .. b)-0.5*P*(int(int(r*(diff(w, r))^2, r = a .. b), t = 0 .. 2*Pi)):

Time = time()-tm;

I am looking for a window bat file to run my maple input file.mw

How can I find all roots of sin(sqrt(x)) as the search interval is not constant and depens on x for this function?

Is there a 3D globe available for Maple?  Specifically, a globe depicting the Earth's continents and oceans, that can be grabbed and rotated with the mouse like any other 3D Maple plot?

I can't believe I've just spent a half hour trying to do the simplest thing:

The second example is copied straight out of Tutorial 2.  I'm doing just what the tutorial says: right-click, Solve, Solve for Variable.  I've tried disabling everything in my startup profile, recalculating, restarting, etc.  Why in the world can't I do this simple thing?

Solve_for_variable.mw

Is it possible that the two-variable arctan function arctan(a(x),b(x)) could be could be equal to arctan(a(x)/b(x)) as long as x>0? And why?

arctan(a(x),b(x))=arctan(a(x)/b(x) as long as x>0 ?

Thank's for any replies :)

Hi,

Please I would like to find out if it is possible to plot from a matrix, for example

1) Plot the first and second rows of a matrix, where y-axis is the first row and x-axis is the second row

2) Plot a 3-D diagram using,e.g., first, second and third rows from a matrix. Or

3) Plot the first row of the matrix on the y-axis and then let the x-axis be a time period (e.g. quarters 1, 2, 3, 4).

I attached my Maple file which is solved using FSOLVE. I would like to (i) plot variable A and parameter T  And (ii) plot variables A and F against parameter T in a 3-D form. 

Your help is highly appreciated.

 

Regards,

 

Mela

 

Since thinking over my question I have actually answered it!  ...so I'd just appreciate some comments regards some finer points.  I was initially trying to print out a complex number, and I see in Maple Primes that Joe Riel answered a similar question in Dec 2011  viz

printf"%5.3Z\n",5+3I);  outputs

5.000+ 3.000I

    The documentation in Maple 7 did not give any examples of printing a complex number, and it talked of using z or Z together with a 'c'.  Initially I thought the c was a reference to complex numbers - but after trial and error I finall figured it stood for character.   In the code below I have reinstated the c between the  z and f.  I wanted the output withour the c, and finally removed it - but leaving one space.  (More than one space returns a syntax error.)   My next question was how to find the real and imaginary parts - which I've answered in the code.

    I'm just wondering if the f in zcf is superfluous?  Also, the documentation in Maple 7 seems to make out there are differences between upper and lower case z?  Any comments gratefully received

David

 

 zz:=eval(Zeta(2.5+3*I));

#zz:=eval(2.5+3*I);

a:=Re(zz);

b:=Im(zz);

printf("%zcf   %6.5f  %6.5f\n",zz, a, b);

 

Does anyone know how to calculate basic reproduction number using maple coding? Or by any chance, anyone know how to solve it by hand with this complicated equations?
 

restart

interface(imaginaryunit = j)

I

(1)

lambda := k*tau*(C*Upsilon+I)/N

k*tau*(C*Upsilon+I)/N

(2)

eqn1 := (1-p)*Pi+phi*V+delta*R-(mu+lambda+`&vartheta;`)*S

(1-p)*Pi+phi*V+delta*R-(mu+k*tau*(C*Upsilon+I)/N+vartheta)*S

(3)

eqn2 := p*Pi+`&vartheta;`*S-(lambda*`&epsilon;`+mu+phi)*V

p*Pi+vartheta*S-(epsilon*k*tau*(C*Upsilon+I)/N+mu+phi)*V

(4)

eqn3 := rho*lambda*S+rho*`&epsilon;`*lambda*V+I*(1-q)*eta-(mu+beta+chi)*C

rho*k*tau*(C*Upsilon+I)*S/N+rho*epsilon*k*tau*(C*Upsilon+I)*V/N+(1-q)*eta*I-(mu+beta+chi)*C

(5)

eqn4 := (1-rho)*lambda*S+(1-rho)*`&epsilon;`*lambda*V+chi*C-I*(mu+alpha+eta)

(1-rho)*k*tau*(C*Upsilon+I)*S/N+(1-rho)*epsilon*k*tau*(C*Upsilon+I)*V/N+chi*C-(mu+alpha+eta)*I

(6)

eqn5 := beta*C+I*q*eta-(mu+delta)*R

beta*C+q*eta*I-(mu+delta)*R

(7)

``


 

Download Equation_for_basic_reproduction_number.mwEquation_for_basic_reproduction_number.mw

Dear all,
Greetings!
I have made a code that solves a nonlinear system of equations by using Newton's Method. I am facing a problem in printing the Jacobian at each iteration. It only prints its lable not the Jacobian matrix itself. Please help me in this regard.
 

"restart;  iter:=5;  f[1](x,y):=3 x^(2)-y^(2);  f[2](x,y):=3 x^()*y^(2)-x^(3)-1;"

5

 

proc (x, y) options operator, arrow; 3*x^2-y^2 end proc

 

proc (x, y) options operator, arrow; 3*x*y^2-x^3-1 end proc

(1)

var := x, y

x, y

(2)

pointt := [x[n], y[n]]

[x[n], y[n]]

(3)

NULL

NULL

NULL

x[0] := 1; y[0] := 1

1

 

1

(4)

for n from 0 to iter do print('f1' = f[1](x[n], y[n]), 'f[2]' = f[2](x[n], y[n])); print('J'*[n] = J[n]); J[n] := Student[MultivariateCalculus][Jacobian]([f[1](x, y), f[2](x, y)], [var] = pointt, output = matrix); sol[n] := eval((Vector(2, {(1) = x[n], (2) = y[n]}))-1/J[n].(Vector(2, {(1) = f[1](x[n], y[n]), (2) = f[2](x[n], y[n])}))); x[n+1] := evalf(sol[n][1]); y[n+1] := evalf(sol[n][2]); print(x[n+1], y[n+1]) end do

f1 = 2, f[2] = 1

 

J*[0] = J[0]

 

.6111111111, .8333333333

 

f1 = .4259259256, f[2] = 0.44924554e-1

 

J*[1] = J[1]

 

HFloat(0.5036590808700434), HFloat(0.8524944221287727)

 

f1 = HFloat(0.03427066946790058), f[2] = HFloat(-0.029666658033242088)

 

J*[2] = J[2]

 

HFloat(0.4999641210723523), HFloat(0.8660456363859079)

 

f1 = HFloat(-1.4267722412308892e-4), f[2] = HFloat(-1.2576398193964167e-6)

 

J*[3] = J[3]

 

HFloat(0.50000000001492), HFloat(0.8660254018170033)

 

f1 = HFloat(3.45245787514159e-9), f[2] = HFloat(-5.089167087746205e-9)

 

J*[4] = J[4]

 

HFloat(0.5), HFloat(0.8660254037844386)

 

f1 = HFloat(1.1102230246251565e-16), f[2] = HFloat(-2.220446049250313e-16)

 

J*[5] = J[5]

 

HFloat(0.5), HFloat(0.8660254037844387)

(5)

NULL

NULL


 

Download q1nwtnnonlinearsys.mw

the print output is too ugly, any help in making it more elegant would also be appreciated .

First 875 876 877 878 879 880 881 Last Page 877 of 2433