Kitonum

21500 Reputation

26 Badges

17 years, 60 days

MaplePrimes Activity


These are answers submitted by Kitonum

A:=plot(sqrt(x), x=-1..5, thickness=3, color=blue):

B:=plot(sqrt(x), x=1..4, filled=true, color=yellow, view=[-1..5, -1..3]):

plots[display](A,B, scaling=constrained);

 

 

solve(z^3=lambda^3, z);

is(-1/2+1/2*I*3^(1/2)=exp(2*I*Pi/3));

 

 Addition: You can also write it in exponential form or by  j :

Sol:=solve(z^3=lambda^3, z);

z1, z2:=op(1,Sol[2]), op(1,Sol[3]);

op(subs({z1=abs(z1)*exp(``(Pi*argument(z1))),z2=abs(z2)*exp(``(Pi*argument(z2)))}, [Sol]));

op(subs({z1=j,z2=j^2}, [Sol]));

 

 

Enough to check that any vector of the subspace  V  can be uniquely decomposed into the specified basis:

V, e1, e2, e3:=<2*a+b+c, 3*a+b+2*c, 2*a+c, b+7*c>, <2,3,2,0>, <1,1,0,1>, <0,1,1,6>;

Equate(V, x*e1+y*e2+z*e3);  #  The system of linear equation

solve(%, {x,y,z});

 

 

Not permissible to consider the integral of the sequence.

Should be

V1 := [1/9, -5/9, 7/9, 1/9, -5/9, 7/9, 1/9, -5/9, 7/9];

V2:=expand(t*V1);

seq(Int(V2[i], t=0..1), i=1..9);

 

V1 is not a vector, it is a list.

 

Variant for a vector:

V1 := <1/9, -5/9, 7/9, 1/9, -5/9, 7/9, 1/9, -5/9, 7/9>;

V2:=t*V1;

map(Int,V2,t=0..1);

restart;

CartProd1:=proc(L::list, N::posint)

local It;

It:=proc(M::list)

[seq(seq([L[i],op(M[j])], i=1..nops(L)), j=1..nops(M))];

end:

(It@@(N-1))(L);

end:

 

Example: 

n:=3: L:=[0,1]: N:=n*(n+1)/2:

M:=CartProd1([0,1],N):

Ind:=[seq(seq([i,j], j=i..n), i=1..n)]:

K:=[seq(Matrix(n,{seq(op(Ind[k])=M[s][k],k=1..N)},shape=symmetric), s=1..nops(M))]:

nops(K);

K[1..30];  # The first 30 such matrices from total 64 ones

 

In Maple 12 classic:

restart;

CartProd1:=proc(L::list, N::posint)

local It;

It:=proc(M::list)

[seq(seq([L[i],op(M[j])], i=1..nops(L)), j=1..nops(M))];

end:

(It@@(N-1))(L);

end:

 

map(Matrix,CartProd1([0,1,2],6),2,3);

To save time, at first it is convenient to create these matrices as lists, and then necessary  lists to  convert  in matrices. In the example displayed  the first  10 and the last 10 of 729 matrices:

restart;

m,n:=2,3:

T:=combinat[cartprod]([[0,1,2] $ m*n]): i:=0:

while not T[finished] do

i:=i+1:  L[i]:=T[nextvalue]() end do:

convert(L, list):

 

N:=nops(%);

seq(Matrix(m,n,L[k]), k=1..10);

seq(Matrix(m,n,L[k]), k=N-9..N);

 

The fsolve command did not take into account the constraints that assume command imposes. To solve your problem, it is necessary to choose the starting point for the iterations. After several attempts, I have found such a point:

restart;

Digits:=20:
assume(w>0): assume(T>0): assume(k>0): assume(ki>0): assume(Mn>0): assume(Ms>0): assume(Tf>0): assume(alfa>0):
Gp:=1/exp(sqrt(w*I)):
Cf:=((T*w*I+1)/(Tf*w*I+1)):
Cpi:=(k*w*I+ki)/(w*I):
L:=Cf*Cpi*Gp:
L:=evalc(L):
F:=subs({Ms=2,Tf=(k*T^(alfa)/Mn)^(1/alfa)},evalc(abs(1+L)^2-1/Ms^2)):
F:=subs({Mn=10,alfa=0.2},evalc(F)):
Fw:=diff(F,w):
Fk:=diff(F,k):
Ft:=diff(F,T):
Sol:=fsolve({F,Fw,Fk,Ft},{w=10,k=5,ki=10,T=10});
evalf(eval({F,Fw,Fk,Ft}, Sol));

 

 

 

 

I tried to solve your system with Mathematica and it showed that the system is inconsistent:

 

Urgoth40, 

you made ​​a few mistakes in your code: 

1 Incorrectly placed parentheses. 

2 You wrote down only the expression for the last term, but should be the sum of terms. 

3 Since the animation parameter  n  assumes only discrete values ​​with variable pitch, it is better to use  plots[display]  with option  insequence=true  instead of  plots[animate] .

 

Here is a solution of your problem (12 frames allocated to every plot - approximately 1 sec):

L := [seq(5*2^i, i = 0 .. 7)];

S:=seq(plot(add(2/((2*k-1)*Pi)*sin((2*k-1)*Pi*x),k=1..n), x=-1..1) $ 12, n=L):

plots[display](S, insequence=true, scaling=constrained);

                                          L := [5, 10, 20, 40, 80, 160, 320, 640]

 

 

m:=1:  N:=2:

Matrix(N*(m+1), (i,j)->`if`(j=m+1+i, 1, 0));

k:=3:  m:=1:  P:=Matrix(m+1, [1,2,3,4]):  P1:=Matrix(m+1, fill=1)/k/(m+1):  P0:=Matrix(m+1):

Matrix([seq([P0 $ i-1, P/k, P1 $ k-i], i=1..k)]);

 

 

All the formulas you can see in the link  http://orion.math.iastate.edu/alex/166H/polar_lines_tangents.pdf

r:=theta->3-3*cos(theta):

theta1:=3*Pi/4:

a:=polarplot(r(theta),theta=0..2*Pi, color=blue, thickness=2):

phi:=-arcsin(D(r)(theta1)/sqrt(r(theta1)^2+D(r)(theta1)^2)):

d:=r(theta1)^2/sqrt(r(theta1)^2+D(r)(theta1)^2):

theta0:=theta1+phi:

b:=polarplot(d/cos(theta-theta0), theta=Pi/3..23*Pi/24, color=red):

c:=plottools[disk]([r(theta1)*cos(theta1),r(theta1)*sin(theta1)],0.1, color=red):

plots[display](a,b,c, scaling=constrained);

 

 

Carl, your code does not work for earlier versions (for example in Maple 12). Here are 2 variants for earlier versions:

M:=Matrix(3,[[1,1,1],[2,2,2],[3,3,3]]);

{parse(cat(op(map(rhs, convert(op(2,M), list)))))};

{parse(cat(op(ListTools[Flatten](convert(M, listlist)))))};

restart;

A:=Matrix( [ [1,2,3],[4,5,-1]] );

for i to 2 do

for j to 3 do

if A[i,j]>=3 then L[i,j]:=[i,j]  fi:

od: od:

convert(L, list);

 Another way:

restart;

A:=Matrix( [ [1,2,3],[4,5,-1]] );

select(x->A[x[1],x[2]]>=3, [seq(seq([i,j], j=1..3), i=1..2)]);

 

 

 

First 234 235 236 237 238 239 240 Last Page 236 of 290