MaplePrimes Questions

Dear Maple users

An engineering student asked me how Maple is handling complex numbers in polar form. He told me that his fellow students are using another CAS, whereas he himself prefer Maple. When making calculations with AC currents having different phases the other students were using the easy notation depicted in the first line on the picture below. Obviously here the angle (argument) is measured in degrees. I tried to perform the same calculations in Maple, but found it to require a very heavy notation: the other three lines on the picture. Now my question is: Does it really have to be that messy, or maybe there are some package, which will accomplish the task in a more neat way? I mean it is a rather common operation in the engineering sciences.

NB! Of couse one can argue about the educational value of using the notation of the other CAS! From that viewpoint they will probably not learn anything ...

 

 

Regards,

Erik

 

Can Maple compare irrational numbers?

A simple command like   if(2<√5,0,1)   is not working for me. 

 

  If I use

 

f:=(a+b)^2;
expand(f);

 

I got 

a^2+2ab+b^2

 

This result holds if ab=ba. Otherwise the result is a^2 + ab + ba + b^2

 

Is there any simpler way to obtain  a^2 + ab + ba + b^2? I looked up http://www.maplesoft.com/support/help/maple/view.aspx?path=dot

but did not find a solution :(

 

Thank you very much!

 

 

 

I define unit vectors as

delta[1] := Vector(3, {(1) = 1, (2) = 0, (3) = 0})

delta[2] := Vector(3, {(1) = 0, (2) = 1, (3) = 0})

delta[3] := Vector(3, {(1) = 0, (2) = 0, (3) = 1})

Then I manually take the dot product as

Eq3 := delta[1].delta[1]+delta[1].delta[2]+delta[1].delta[3]+delta[2].delta[1]+delta[2].delta[2]+delta[2].delta[3]+delta[3].delta[1]+delta[3].delta[2]+delta[3].delta[3]

and get

Eq3 := 3

But when I do this

Eq4 := sum(sum(delta[i].delta[j], j = 1 .. 3), i = 1 .. 3)

I get

Eq4 := Vector(3, {(1) = Vector(3, {(1) = 1, (2) = 1, (3) = 1}), (2) = Vector(3, {(1) = 1, (2) = 1, (3) = 1}), (3) = Vector(3, {(1) = 1, (2) = 1, (3) = 1})})

How can I make Maple give me the first result using the sum command?

 

------------------------------------------------------------------------------------------------------------------------------

restart:

Digits :=30: m := 4: g :=0.3: nu := 0.4: a := 1:k:=0.2:

W:=cos(n*2*evalf(Pi)*( r-k*a)/((1-k)*a)):

ODE:=((2*(diff(W, r, r, r, r))+2*(diff(W, r, r, r))/r-4*(diff(W, r, r))/r^2+4*(diff(W, r))/r^3-(2*(1-nu))*(diff(W, r, r, r))/r+(4*(1-nu))*(diff(W, r, r))/r^2-(4*(1-nu))*(diff(W, r))/r^3)*r*(1+g*r/a)^3+(2*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*(1+g*r/a)^3+(6*(2*(diff(W, r, r, r))+2*(diff(W, r, r))/r-2*(diff(W, r))/r^2-(2*(1-nu))*(diff(W, r, r))/r+(2*(1-nu))*(diff(W, r))/r^2))*r*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*(1+g*r/a)^2*g/a+(6*(2*(diff(W, r, r))+2*(diff(W, r))/r-(2*(1-nu))*(diff(W, r))/r))*r*(1+g*r/a)*g^2/a^2-((2*(diff(W, r, r, r)+(diff(W, r, r))/r-(diff(W, r))/r^2))/r-(2*(diff(W, r, r)+(diff(W, r))/r))/r^2-(2*(1-nu))*(diff(W, r, r, r))/r+(2*(1-nu))*(diff(W, r, r))/r^2)*r*(1+g*r/a)^3-((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r)*(1+g*r/a)^3-(3*((2*(diff(W, r, r)+(diff(W, r))/r))/r-(2*(1-nu))*(diff(W, r, r))/r))*r*(1+g*r/a)^2*g/a)/(2*(diff(W, r, r))*r+2*(diff(W, r))) :

for i from 1 to m do  for j from 1 to m do
C[i,j]:=int(subs(n=i,ODE)*subs(n=j,W),r=k*a..a)
end do:end do:

Why does the collect command work for some expressions and not for others. Here is a screen shot

I assume the collect command is supposed to rewrite the expression in terms of the variable descending order.

p := expand((a^2+2*x)*(a^2+2*x));
                        4      2        2   2
                       a  + 4 a  x + 4 x

collect(p, x);
                        4      2        2   2
                       a  + 4 a  x + 4 x

Does not work.

But if you look at the screenshot , it works for other expressions.

I found an error in a file I posted that I would like to correct. Can I modify the existing post? Delete it and make an new one?

I am trying to solve and plot a diff. eq. with two initial condtions and keep getting the same error.

F1 := diff(x(t), `$`(t, 2))+omega^2*sin(x(t)) = 0;

g := 9.8; L := 1; omega := g/L;

sol := dsolve({F1, D(x)*0 = 0, x(0) = (1/2)*pi}, x(t), numeric);
Error, (in dsolve/numeric/process_input) invalid specification of initial conditions, got 0 = 0

 any help or suggestions would be appreciated

I have some X-Y data, and I would like to calculate a definate integral of the data. In this case x_data and y_data are vectors.

I tried this method.

y:=x->ArrayInterpolation(x_data,y_data,x)

But when I try to calculate an integral like this, I get an error.

int(y, x0..x1)

Error, (in int) operator y cannot be evaluated at one variable.

What is this error trying to tell me? I have tested by function y for values x1 and x2. My data is smooth and includes x1 and x2. I have no reason to believe that the function cannot be evaluated for any value of x. 

Is there another (better) way to do what I want? This is a part of a large worksheet that reads data from an excel file, and I don't know how to reduce the worksheet for only this problem.

Thanks.

A procedure can be made available in many worksheets by copying its original commands to each such worksheet. Is there a better way to include and invoke such a procedure in multiple worksheets?

with(Physics):
L := diff(q2(t), t)
diff(L, q2(t))

it return 0, is it correct?

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

For the life of me I can not get maple to plot this equation.  I have poured over various resources and it simply isn't working.  I have gone so far as to use SIMPLIFY and even  Re(circuitSix) and Im(circuitSix) yet still get only errors.  Any insight would be appreciated.

I want to make a nested loop and store the data(with complex numbers) in matrix in order to make 3D plot.

The function hypergeom([2/3,2/3,2/3],[-1/3,4/3],z) has radius of convergence 1 and real coefficients.

But Maple tells me evalf(hypergeom([2/3, 2/3, 2/3], [-1/3, 4/3], 99/100),50);

is -138.999 + 0.0012 I
 


It should be more like −138.9962313171333091754979138344422738025

(Maple 18, version 991181)

---

G A Edgar

First 1226 1227 1228 1229 1230 1231 1232 Last Page 1228 of 2428