MaplePrimes Questions

restart:with(plots):

TSol:= f(x,y,Q); # The actual funtion is in the attached maple sheet because of its size.

animate( plot3d, [TSol,y=-1..1,x=0..1], Q=0..2,contours=65,style=patchnogrid, grid=[80,80], orientation=[-360,-180], lightmodel=light4, shading=zhue, transparency=0.3,style=contour);

 

 

plot3d(subs(Q=2,TSol),y=-1..1,x=0..1,contours=65,style=patchnogrid, grid=[80,80], orientation=[-360,-180], lightmodel=light4, shading=zhue, transparency=0.3,style=contour);

 

For Q = 2, why there is a big difference between these two ouputs?

 3d_anim_try.mw (If the maple sheet is not accessible then let me know, I will copy past the function (f(x,y,Q))?)

I have a question regarding maple reader.

 

It seems like in maple reader, one cannot interact with the output of the Explore function.... which mean I am forced to make my own component if I want to creat application for my co-worker to use..this is some what annoying.  Is there another way around?

 

please open the attached file in maple player and you will see the output created by Explore gives error message.  mapleplayer_test.mw

 

Download mapleplayer_test.mw

.  

Hello everyone, 

I have a problem solving with ODE's system solving. I have 2 equation and 4 initial  conditions. When i calculate like that,u can look this file.  beamsolvingfortim.mw. It is working it is giving me T1 and T2 equations depends on time. 

 

 In 2. system which i have a problem i want to calculate this equations depends on x(displacement). I have again 2 equation and 4 boundry conditions. it is solving the ODE'S system without boundry conditions. (It is giving with C1 C2 C3 and I)Problem is when i want to find its values with boundry conditions it is not giving a result. Is there a problem with complex number(I) or boundry conditions are not enough?   

 

> evalf(dsolve({sys}));

{X1s(x) = -3.060206320 + _C1 exp(-0.3487988669 x)

+ _C2 exp(0.3487988669 x) + _C3 exp(-0.3563227426 I x), X2s(x) =

-0.6321326989 _C1 exp(-0.3487988669 x)

+ 0.6321326989 _C2 exp(0.3487988669 x)

- 0.6053448484 I _C3 exp(-0.3563227426 I x)}

When i write like that, nothing is happening. I also upload the files. If u can help , i would be really appreciate. 

eq2 := dsolve({A, B, bc}, [X1s(x), X2s(x)])

beamsolving(thick.mw

 

 

Hello everybody,

 

I want to use the physics package in the context of special relativity.  I am mostly interrested with the Lorenzts transformations, not having to unprotect gamma all the time, the 4-vectors for space, time and momentum in (ct,x,y).  For exemple, to be able to calculate the invariant (ct)^2-(r^2).  A small document (or worksheet) would be very nice of you.

I understande that someone could say that I want to use a gun to kill a fly.  But this is a process that will lead me in using it in general relativity and using tensors in my calculations.  It would be very interresting to have a Student,Physics package.  Don't you think so?

Thank you in advance for your trouble and comprehension.

 

--------------------------------------
Mario Lemelin
Maple 18 Ubuntu 13.10 - 64 bits
Maple 18 Win 7 - 64 bits messagerie : mario.lemelin@cgocable.ca téléphone :  (819) 376-0987

It is well known that  operating in  geometry  package when setting objects symbolically some inconveniences arise. The error occurs if you do not set limits on the parameters. I wrote the procedure for finding center and radius of the circumscribed circle, devoid of drawbacks:

restart;

Circumcircle:=proc(a,b,c)

local x1, y1, x2, y2, x3, y3, n;

uses geometry;

x1,y1:=op(a); x2,y2:=op(b); x3,y3:=op(c);

n:=x2*y3-x3*y2+x3*y1-x1*y3+x1*y2-x2*y1;

point(A,a), point(B,b), point(C,c);

if type(n,realcons) then triangle(T,[A,B,C]); circumcircle(cc,T,'centername'=OO);

return [coordinates(OO),radius(cc)]  else assume(n<>0);

triangle(T,[A,B,C]); circumcircle(cc,T,'centername'=OO);

simplify([coordinates(OO),radius(cc)]); fi;

end proc:

 

At initial startup procedure works correctly:

Circumcircle([x1,y1], [x2,y2], [x3,y3]);

 

 

But if you change the arguments of the procedure, an error occurs:

Circumcircle([x1,1], [x2,y2], [x3,y3]);

 

But if you run the procedure again with the same arguments, the error disappears:

Circumcircle([x1,1], [x2,y2], [x3,y3]);

 

What is the reason?

Circumcircle.mws

Hi, the following Maple code produces an error for the value x=0: 0 instead of 1.

 

> for x from 0 to 5 do 

>print(evalf(sum((-1)^k*x^(2*k)/factorial(2*k), k = 0 .. 10)), evalf(cos(x))) 

> end do; 

0., 1. 
0.5403023059, 0.5403023059 
-0.4161468365, -0.4161468365 
-0.9899924966, -0.9899924966 
-0.6536436057, -0.6536436209 
0.2836642141, 0.2836621855 

Why such an error?

My solution to obtain the good value is:

> for x from 0 to 5 do 

> print(evalf(subs(y=x,sum((-1)^k*y^(2*k)/factorial(2*k), k = 0 .. 10))), evalf(cos(x))) 

> end do; 
                                1., 1. 


                      0.5403023059, 0.5403023059 


                     -0.4161468365, -0.4161468365 


                     -0.9899924966, -0.9899924966 


                     -0.6536436057, -0.6536436209 


                      0.2836642141, 0.2836621855 

Thanks.

Pls, I tried solving the system of PDE numerically.... When I did for just 1 plot, the graph was plotted easilyrunning.mw but When I varied some parameters its not coming out.... Also, its not bringing any error so I can't trace out my mistakes....Not_runnin.mw PLS HELP ME OUT with the multiple plots... Attached are my source codes links....

 

Hello,

I have trouble in using the function factors. For example, I expect

factor(Pi*(t^2+1), {I});

to output

-Pi*(-t+I)*(t+I)

but instead the result is

Pi*(t^2+1)

This problem does not appear if Pi gets replaced by a general symbol:

factor(pi*(t^2+1), {I});

produces (as I expect it should)

-pi*(-t+I)*(t+I)

The problem seems to be tied to symbols representing constants, as for example replacing Pi by Catalan also results in no factorization being performed. It further seems to be tied to specifying a splitting field, because

factor(Pi*(t^2-1));

results in

Pi*(t-1)*(t+1)

Is this behaviour intended? Probably the reason is that the polynomial does not have algebraic coefficients (as it includes Pi). Indeed,

factor(Pi*(t^2-1),{});

produces the error message

Error, (in factor) expecting a polynomial over an algebraic number field

But why does this error then not appear for the call factor(Pi*(t^2-1))? If this would assume complex coefficients, it should factor using I. Considering coefficients in an algebraic number field, also the original call factor(Pi*(t^2+1), {I}); should raise an error!?

Thanks,

Erik

When using Maximize, is it possible to now what parameter settings that resulted in complex numbers?

KR Fredrik

 

Maximize(Eq1_new, {R_K*rho*`&sigma;_K`+R_S*`&sigma;_S` >= .38780613588076011954, r_K*rho*`&sigma;_K`+r_S*`&sigma;_S` >= .21290471165685214846, R_K*rho*`&sigma;_K`+R_S*`&sigma;_S` <= .38780613588076011954, r_K*rho*`&sigma;_K`+r_S*`&sigma;_S` <= .21290471165685214846});


Error, (in Optimization:-NLPSolve) complex value encountered


intsolve(int(f1(u)*(x-y), u = a .. b) = (12)*cos(x)+5*x^2-12, f1(x));I try to resolve the integral equation but i received all the time the followinf message error 

Error, (in intsolve) invalid input: rhs received {f1(x) = ?}, which is not valid for its 1st argument, expr
I try to use different form but i do not how to resolve the help center do not help to much.

I preciate any help thanks

 

Which book is the starting point and have examples

Hi.

please, I need some code about stepsize adaptative Runge Kutta method ( any order ) or other methods.

Thanks

I am trying to produce an animation. Everything seems correct, but the evaluation is taking a very long time. Even after an hour, it still tries to crank out a graph for me. I even tried to truncate the integral!

Here is my code.

with(plots):

z:= x -> 2*(int((sin(2*y)-sin(y))*cos(y*x)*exp(-y^2*t)/y, y = 0 .. 200))/Pi;

animate(plot, [z(x), x = 0 .. 10, y = -.1 .. 2], t = 0 .. 1, frames = 100);

 

Would could be the problem? 

Hi all

How to read a value from keyboard of PC when executing a maple document and assign it to a variable ?

Thanks

 


Dear the specialst in programmation, please I need to put a conditon if in this procedure with this form: Can you correct me this code please. Thank you.


aaa:=proc(x,y,f,N)
local bb,
for i= from 1 to N do

bb[i]:=f(x[i],y);

if bb[i]<=2 then y:=3*x[i] else y::=x[i]^2end if ;

end do:

end proc

 

 

First 1160 1161 1162 1163 1164 1165 1166 Last Page 1162 of 2141