Maple 14 Questions and Posts Maple 14 Questions and Posts Feed

These are Posts and Questions associated with the product, Maple 14

Hello,

 

I'm modeling the simple DC motor system in Maple.
The equations describing the system;

eq1:=J*diff(theta(t),t,t)+b*diff(theta(t),t)=K*i(t):
eq2:=L*diff(i(t),t)+R*i(t)=V(t)-K*diff(theta(t),t):
DCMotor:=[eq1,eq2];

First, I create the system using DiffEquation:

Sys:=DiffEquation(DCMotor,[V(t)],[theta(t)]);

And now I have problem. The input var is V(t) (input voltage) and the output var is theta(t) (position of the rotor).

But I wont to have in output var not position of the rotor but speed of the fotor - diff(theta(t),t)

How to set output var for diff(theta(t),t) (the speed of the motor)?

 

Best

Rariusz

 

I tried to make a procedure that would find the determinant of any 3x3 matrix but I keep getting unterminated procedure what should I change??

Code:
DeterminantMat:=proc(matA::Array)
    local  i::integer,  j::integer,  x::integer,  y::integer,  A::integer,  B::integer,  indice::integer,  S::integer:
      A:=0:  B:=0:  S:=0: i:= 1:  j:=1:  x:=1:  y := 1:  indice:=1:

for x from 1 to 3 do
   indice := 1:  
   for i  from 1 to  3 do  
       if x = i then
           end do:
        else if x <>i then
           for j from 1 to 3 do
                  if y = j then  end do:  
                  else if indice = 1 then  A := matA(i,j):  indice := 2:  
                     else if indice = 2 then  B:=matA(i,j):  indice :=3:    
                       else if indice = 3 then  B :=B * matA(i,j):  indice :=4:    
                         else if indice = 4 then  A := A * matA(i,j):      
                             if x = 2 then  S := S + (-1 * matA(x,y)) * (A-B):
                               else  S := S + matA(x,y) * (A-B):   end if:   end if:
 end do:
 end if:
 end do:
 end do:
 end proc:

I try to repeat lines (25)-(28) at

 

http://www.maplesoft.com/support/help/maple/view.aspx?path=Physics%2fTrace#commentform

 

I use Maple 14. However, instead of (28) I get the following result:

 

It means that Maple 14 does not perceive p_\mu, k_\nu and m as scalar quantities. I would like to ask how to define these variables correctly.

 

Thank you in advance!

Hi!

I am comptuing the eigenvalues and the characteristic polynomial of a 8 by 8 symmetric matrix, say M. Thus, we define the matrix M, and compute its charast. plynm. by

 

 

and its eigenvalues with the command

 

 

Well, Maple returns the charast. polynm. an dthe eigenvalues. But, if we compute p(E[k]), for k=1,...,8, thats is, the values of the polynomial p(x) in the eingenvalues, Maple not turns cero!!! I'm really confused ... anyone know what could be happening?

 

Maple attached file with this example. Thank very much for your help!!

 

Download exam_eigenvalues.mw

Error, (in fsolve/polynom) Digits cannot exceed 38654705646

 

I am using fsolve to find numerical approximations to the roots of many fairly large polynomials (degrees up to ~80).  I often get this error message and I'm not sure why.  Is there any workaround?  Any help is much appreciated.

Hello,

I am trying to use Apollonius procedure from geometry package. Here is an example:

restart;
with(geometry):
circle( c1, [ point( c1c, 0 , 0 ), 5 ] );
circle( c2, [ point( c2c, 5 , 4 ), 2 ] );
circle( c3, [ point( c3c, 13 , 0 ), 3 ] );
A := Apollonius( c1, c2, c3 );

Unfortunatelly the Apollonius method does not give any result. The only message is:

intersection: there is no point of intersection

 

Anyone know what is wrong in my code?

Best regards

Rafał Nowak

   Hi there,

   How can we pl0t the volume or surface of revolution of cardioid r=1-cos(\theta) about  polar axis or the vertical axis in maple14.

 Any help will be appreciated.

M.R.Yegan

Hello. I have a question. If you can help me, i am pleasure.

Have nice day. :)

 

restart;
soru := proc(n,x)
local top::0;
for x from 2 to n do
top =top+(((x^(2+i))*top)^(1/(n+2-i)));
print(top);
od;
end proc;

 

soru(5,1);

Error, (in soru) illegal use of a formal parameter

Hello. I have a question. If you can help me, i am pleasure.

Have nice day. :)

 

Question: Enter a number after maple find(understand) to prime number or normal number.

 

restart;
> asal := proc(n)
> local m;
> if n<2 then
> m := s=n/2+1;
> print(m);
> else
> for i from 2 to n do
> if irem(n,i,0) then
> print("asal değil");
> if i = m then
> print("asaldir");
> end do;
> end if;
> end if;
> end proc;

 

Hi

I want to run the following code repeatedly displays but do not draw diagrams.

>restart;`read`(orbit.sav)
> dsnumsort := proc (numpr::list, Coor::list)
local i, j, n; global C1, C2, C3, V1, V2, V3;
n := nops(Coor); print("Order of the variables:");
for i from 2 to 2*n+1 do
for j to n do
if [numpr[i]] = select(has, numpr, diff(Coor[j](t), t)) then C[j] := i-1; V[j] := i;
print(Coor[j], C[j], " ", diff(Coor[j](t), t), V[j])
fi;
od;
od;
end:
>dx := diff(x(t), t, t) = -G*Mz*x(t)/(x(t)^2+y(t)^2)^(3/2);
>dy := diff(y(t), t, t) = -G*Mz*y(t)/(x(t)^2+y(t)^2)^(3/2);
>IniC := x(0) = 7*10^6, (D(x))(0) = 1, y(0) = 0, (D(y))(0) = 9*10^3;
>Ns := dsolve({dx, dy, IniC}, {x(t), y(t)}, numeric);
>dsnumsort(Ns(0), [x, y]):
>for i from 0 to 328 do T := 40*i; NsT := Ns(T);
>X[i], Y[i], Vx[i], Vy[i] := (eval([x(t), y(t), diff(x(t), t), diff(y(t), t)], NsT))[]
>od:
>i := 'i'; j := i+1;
>with(plots);
> plot([seq([X[i]-XS[j], Y[i]-YS[j]], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([Vx[i]-VxS[j], Vy[i]-VyS[j]], i = 0 .. 328)], labels = ['dx', 'dy'])
> R := sqrt(XS[j]^2+YS[j]^2);
>sin := YS[j]/R; cos := X[j]/R;
> GCX := (X[i]-XS[j])*cos-(Y[i]-YS[i])*sin;
> GCY := (X[i]-XS[j])*sin+(Y[i]-YS[i])*cos;
> GCVx := (Vx[i]-VxS[j])*cos-(Vy[i]-VyS[i])*sin;
> GCVy := (Vx[i]-VxS[j])*sin+(Vy[i]-VyS[i])*cos;
> plot([seq([GCX, GCY], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([GCVx, GCVy], i = 0 .. 327)], labels = ['dVx', 'dVy'])

Hi,

I want to run this code, but I do not draw diagrams. You can help me?

>restart;`read`(orbit.sav)
> dsnumsort := proc (numpr::list, Coor::list)
local i, j, n; global C1, C2, C3, V1, V2, V3;
n := nops(Coor); print("Order of the variables:");
for i from 2 to 2*n+1 do
for j to n do
if [numpr[i]] = select(has, numpr, diff(Coor[j](t), t)) then C[j] := i-1; V[j] := i;
print(Coor[j], C[j], " ", diff(Coor[j](t), t), V[j])
fi;
od;
od;
end:
>dx := diff(x(t), t, t) = -G*Mz*x(t)/(x(t)^2+y(t)^2)^(3/2);
>dy := diff(y(t), t, t) = -G*Mz*y(t)/(x(t)^2+y(t)^2)^(3/2);
>IniC := x(0) = 7*10^6, (D(x))(0) = 1, y(0) = 0, (D(y))(0) = 9*10^3;
>Ns := dsolve({dx, dy, IniC}, {x(t), y(t)}, numeric);
>dsnumsort(Ns(0), [x, y]):
>for i from 0 to 328 do T := 40*i; NsT := Ns(T);
>X[i], Y[i], Vx[i], Vy[i] := (eval([x(t), y(t), diff(x(t), t), diff(y(t), t)], NsT))[]
>od:
>i := 'i'; j := i+1;
>with(plots);
> plot([seq([X[i]-XS[j], Y[i]-YS[j]], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([Vx[i]-VxS[j], Vy[i]-VyS[j]], i = 0 .. 328)], labels = ['dx', 'dy'])
> R := sqrt(XS[j]^2+YS[j]^2);
>sin := YS[j]/R; cos := X[j]/R;
> GCX := (X[i]-XS[j])*cos-(Y[i]-YS[i])*sin;
> GCY := (X[i]-XS[j])*sin+(Y[i]-YS[i])*cos;
> GCVx := (Vx[i]-VxS[j])*cos-(Vy[i]-VyS[i])*sin;
> GCVy := (Vx[i]-VxS[j])*sin+(Vy[i]-VyS[i])*cos;
> plot([seq([GCX, GCY], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([GCVx, GCVy], i = 0 .. 327)], labels = ['dVx', 'dVy'])

Hi,

I want to run this code, but I do not draw diagrams. You can help me?

>restart;`read`(orbit.sav)
> dsnumsort := proc (numpr::list, Coor::list)
local i, j, n; global C1, C2, C3, V1, V2, V3;
n := nops(Coor); print("Order of the variables:");
for i from 2 to 2*n+1 do
for j to n do
if [numpr[i]] = select(has, numpr, diff(Coor[j](t), t)) then C[j] := i-1; V[j] := i;
print(Coor[j], C[j], " ", diff(Coor[j](t), t), V[j])
fi;
od;
od;
end:
>dx := diff(x(t), t, t) = -G*Mz*x(t)/(x(t)^2+y(t)^2)^(3/2);
>dy := diff(y(t), t, t) = -G*Mz*y(t)/(x(t)^2+y(t)^2)^(3/2);
>IniC := x(0) = 7*10^6, (D(x))(0) = 1, y(0) = 0, (D(y))(0) = 9*10^3;
>Ns := dsolve({dx, dy, IniC}, {x(t), y(t)}, numeric);
>dsnumsort(Ns(0), [x, y]):
>for i from 0 to 328 do T := 40*i; NsT := Ns(T);
>X[i], Y[i], Vx[i], Vy[i] := (eval([x(t), y(t), diff(x(t), t), diff(y(t), t)], NsT))[]
>od:
>i := 'i'; j := i+1;
>with(plots);
> plot([seq([X[i]-XS[j], Y[i]-YS[j]], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([Vx[i]-VxS[j], Vy[i]-VyS[j]], i = 0 .. 328)], labels = ['dx', 'dy'])
> R := sqrt(XS[j]^2+YS[j]^2);
>sin := YS[j]/R; cos := X[j]/R;
> GCX := (X[i]-XS[j])*cos-(Y[i]-YS[i])*sin;
> GCY := (X[i]-XS[j])*sin+(Y[i]-YS[i])*cos;
> GCVx := (Vx[i]-VxS[j])*cos-(Vy[i]-VyS[i])*sin;
> GCVy := (Vx[i]-VxS[j])*sin+(Vy[i]-VyS[i])*cos;
> plot([seq([GCX, GCY], i = 0 .. 328)], labels = ['dx', 'dy']);
>plot([seq([GCVx, GCVy], i = 0 .. 327)], labels = ['dVx', 'dVy'])

Hi,

this code not answer:

> whit*evalf; tx := evalf((t1+t2)*(1/2));
> t1 := 326*40; t2 := 327*40;
> y1, y2 := eval([y1, y2], Ns(t1), Ns(t2));
>while (t1 < tx) and (tx < t2) do:
yx := rhs(Ns(tx)[c2]):
if yx > 0 then
y2 := yx: t2 := tx:
else
y1 := yx: t1 := tx:
fi;
od;
>Tx = evalf(tx);
> Hx := floor((1/3600)*tx):
> Mx := floor((tx-3600*Hx)*(1/60)):
> Sx := tx-3600*Hx-60*Mx:
> Hx, Mx, Sx;
> XS := [seq(X[i], i = 0 .. 328)]: YS := [seq(Y[i], i = 0 .. 328)]:
> VxS := [seq(Vx[i], i = 0 .. 328)]: VyS := [seq(Vy[i], i = 0 .. 328)]:
> save(G,Mz,Xs,VxS,VyS, 'orbit.sav'):

 can you help me?

hi friends

I encountered a problem and I can not draw the plot of this code

> sol := fsolve({diff(S, x) = 0, diff(S, y) = 0}, {x, y});



> with(VectorCalculus);
> with(linalg);
> s1 := evalf(subs(sol, linalg[grad](S, [x, y])));

> with(VectorCalculus);
> with(LinearAlgebra);
> s2 := evalf(subs(sol, linalg[hessian](S, [x, y]))); pmp0 := [x-subs(sol, x), y-subs(sol, y)]; sapprox := s0+evalm(`&*`(`&*`(transpose(pmp0), s2), pmp0));
> with(Statistics);
>
> with(stats); statevalf[icdf, chisquare[4]](.95);

> with(VectorCalculus);
> with(plottools);
> with(plots);
> with(linalg); ellips := {seq(stats*([statevalf[icdf, chisquare[4]]])(c) = sapprox, c = [.5, .95, .999])};
> plots(ellips(x, y), x = 950 .. 1000, y = 700 .. 750, grid = [50, 50], view = [950 .. 1000, 700 .. 750]);

 

 

can you helpe me?Thank you

hi friends

After this cods i see very error

 > restart;

read(orbit.sav ): whit(plots):
ax := -G*Mz*x/(x^2+y^2)^(3/2);
ay := -G*Mz*y/(x^2+y^2)^(3/2);
i := 'i'; j := i+1;
for k from 0 to 3 do
x := 7*10^6; Vx := 0;
y := 0; Vy := 9000;
dt := evalf(1/2^k);
for i from 0 to 328 do
X[i] := evalf(x); Y[i] := evalf(y);
for n to 40*2^k do
x := evalf((1/2)*ax*dt^2+Vx*dt+x); y := evalf((1/2)*ay*dt^2+Vy*dt+y);
Vx := evalf(ax*dt+Vx); Vy := evalf(ay*dt+Vy)
od;
if i mod 41= 0 then
dX[k, i] := X[i]-XS[j]; dY[k, i] := Y[i]-YS[j]
fi
od;
p[k] := plot([seq([(X[i]-XS[j])*(1/1000), (Y[i]-YS[j])*(1/1000)], i = 0 .. 328)], color = green) end do;
p1 := display({seq(p[k], k = 0 .. 3)}, thickness = 3)
SI := [seq(41*i, i = 0 .. 8)]
p2 := plot({seq([seq([(1/1000)*dX[k, i], (1/1000)*dY[k, i]], k = 0 .. 1), [0, 0]], i = SI)}, color = black)
display({p1, p2}, scaling = constrained, labels = ['dx', 'dy'])
display({p1, p2}, view = [-.1 .. .5, -.4 .. .2], scaling = constrained, labels = ['dx', 'dy'])

can you help me Please?

Thank you

 

 

 

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