pik1432

245 Reputation

6 Badges

6 years, 124 days

MaplePrimes Activity


These are questions asked by pik1432

Hello there, 

I wonder if there is any method to eliminate the terms ((6.*10^(-11))*I) in this worksheet. Apparently, they came from the limitation of the numerical precision. 


 

restart;

M2[transform] := <<2/(sqrt(3)*a),-1/(sqrt(3)*a),-1/(sqrt(3)*a)> | <0, -1/a, 1/a>>;

Matrix(3, 2, {(1, 1) = (2/3)*sqrt(3)/a, (1, 2) = 0, (2, 1) = -(1/3)*sqrt(3)/a, (2, 2) = -1/a, (3, 1) = -(1/3)*sqrt(3)/a, (3, 2) = 1/a})

(1)

Iload := <i[T]*exp(-I*Phi[T])|I*i[M]*exp(-I*Phi[M])>;

Vector[row](2, {(1) = i[T]*exp(-I*Phi[T]), (2) = I*i[M]*exp(-I*Phi[M])})

(2)

alpha := exp(I*convert(120*degrees, radians));

-1/2+((1/2)*I)*3^(1/2)

(3)

ABC2SEQ :=  1/3 * <<1,1,1> | <alpha, alpha^2, 1> | <alpha^2, alpha, 1>>;

Matrix(3, 3, {(1, 1) = 1/3, (1, 2) = -1/6+((1/6)*I)*sqrt(3), (1, 3) = (1/3)*(-1/2+((1/2)*I)*sqrt(3))^2, (2, 1) = 1/3, (2, 2) = (1/3)*(-1/2+((1/2)*I)*sqrt(3))^2, (2, 3) = -1/6+((1/6)*I)*sqrt(3), (3, 1) = 1/3, (3, 2) = 1/3, (3, 3) = 1/3})

(4)

Iabc := M2[transform] . (Iload^(%T));

Vector(3, {(1) = (2/3)*sqrt(3)*i[T]*exp(-I*Phi[T])/a, (2) = -(1/3)*sqrt(3)*i[T]*exp(-I*Phi[T])/a-I*i[M]*exp(-I*Phi[M])/a, (3) = -(1/3)*sqrt(3)*i[T]*exp(-I*Phi[T])/a+I*i[M]*exp(-I*Phi[M])/a})

(5)

Iabcx := subs[eval]({a=1.0} , Iabc);

Vector(3, {(1) = .6666666667*sqrt(3)*i[T]*exp(-I*Phi[T]), (2) = -.3333333333*sqrt(3)*i[T]*exp(-I*Phi[T])-(1.000000000*I)*i[M]*exp(-I*Phi[M]), (3) = -.3333333333*sqrt(3)*i[T]*exp(-I*Phi[T])+(1.000000000*I)*i[M]*exp(-I*Phi[M])})

(6)

Ipnz := ABC2SEQ . Iabcx:

simplify( Ipnz );

Vector(3, {(1) = (.5773502693-0.6000000000e-10*I)*i[T]*exp(-I*Phi[T])+.5773502694*i[M]*exp(-I*Phi[M]), (2) = (.5773502693-0.6000000000e-10*I)*i[T]*exp(-I*Phi[T])-.5773502694*i[M]*exp(-I*Phi[M]), (3) = 0.})

(7)

 


 

Download Q20200727_2.mw

Hello all, 

When I tried to extract the RHS of the answer from 'solve()' command, the attempt failed. 


 

restart;

sys := U__s^2 = ((1+sigma)*U__T2N - u__rN * U__T2N/(1+sigma))^2+(u__xN * U__T2N/(1+sigma))^2;

U__s^2 = ((1+sigma)*U__T2N-u__rN*U__T2N/(1+sigma))^2+u__xN^2*U__T2N^2/(1+sigma)^2

(1)

answer := solve( sys, {U__T2N} );

{U__T2N = (1+sigma)*U__s/(sigma^4+4*sigma^3-2*sigma^2*u__rN+6*sigma^2-4*sigma*u__rN+u__rN^2+u__xN^2+4*sigma-2*u__rN+1)^(1/2)}, {U__T2N = -(1+sigma)*U__s/(sigma^4+4*sigma^3-2*sigma^2*u__rN+6*sigma^2-4*sigma*u__rN+u__rN^2+u__xN^2+4*sigma-2*u__rN+1)^(1/2)}

(2)

answer[1];

{U__T2N = (1+sigma)*U__s/(sigma^4+4*sigma^3-2*sigma^2*u__rN+6*sigma^2-4*sigma*u__rN+u__rN^2+u__xN^2+4*sigma-2*u__rN+1)^(1/2)}

(3)

rhs(answer[1]);

Error, invalid input: rhs received {U__T2N = (1+sigma)*U__s/(sigma^4+4*sigma^3-2*sigma^2*u__rN+6*sigma^2-4*sigma*u__rN+u__rN^2+u__xN^2+4*sigma-2*u__rN+1)^(1/2)}, which is not valid for its 1st argument, expr

 

 


Perhaps, the failure might be related to the fact that the equation is contained in curly brackets, but I could not come up with a solution. 

Please let me have a chance to learn the way to do the 'rhs()' operation in the correct way. 

Thank you, 

In Kwon Park 

Download Qprime_20200710.mw

Hello All, 

Would please tell me how to get the result from 'arctan()' function by using a part of the results from 'solve' command?

Here is an example:


 

restart; with(plots):

R_circ := 455.0353986;

455.0353986

(1)

Is6 := 716.6183759;

716.6183759

(2)

Imu6 := 101.1189775;

101.1189775

(3)

sys := { (x - R_circ - Imu6)^2 + y^2 = R_circ^2 , x^2 + y^2 = Is6^2 } ;

{(x-556.1543761)^2+y^2 = 207057.2140, x^2+y^2 = 513541.8967}

(4)

solve( sys, {x,y} );

{x = 553.6164051, y = 455.0283208}, {x = 553.6164051, y = -455.0283208}

(5)

answer5 := %;

{x = 553.6164051, y = 455.0283208}, {x = 553.6164051, y = -455.0283208}

(6)

answer5[1];

{x = 553.6164051, y = 455.0283208}

(7)

arctan((answer5[1][2] / answer5[1][1]));

Error, invalid input: arctan expects its 1st argument, y, to be of type algebraic, but received y/x = .8219198646

 

 


What would be the way to rectify the error above?

Download Qprime20200701.mw

Hello all, 

Would you please tell me how to rewrite the expression 'Is_square' like 'Is_square2'?

The way how the first expression is re-written is that both numerator and denominator were divided by 'sigma^2*omega[rK]^2': 

One attempt I made was to use 'algsub' command using the subexpression ''sigma^2*omega[rK]'', but somehow it missed the term in the denominator. 


 

restart;

Is_square := M[dmax]*(sigma^2*omega[rK]^2 + omega[r]^2)*L[sigma]/(3*p*omega[r]*omega[rK]*L[mu]^2*sigma^2);

(1/3)*M[dmax]*(sigma^2*omega[rK]^2+omega[r]^2)*L[sigma]/(p*omega[r]*omega[rK]*L[mu]^2*sigma^2)

(1)

Is_square2 := M[dmax]*(1 + omega[r]^2/(sigma^2*omega[rK]^2))*L[sigma]/(3*p*omega[r]*L[mu]^2/omega[rK]);

(1/3)*M[dmax]*(1+omega[r]^2/(sigma^2*omega[rK]^2))*L[sigma]*omega[rK]/(p*omega[r]*L[mu]^2)

(2)

algsubs(omega[rK]*sigma^2=tt, Is_square);

(1/3)*M[dmax]*L[sigma]*(tt*omega[rK]+omega[r]^2)/(p*omega[r]*L[mu]^2*omega[rK]*sigma^2)

(3)

 


 

Download Qprime_20200621.mw

 

Hello all, 

Is there any way to avoid the 'Error, recursive assignment' in the expressions below?

The 's' at the LHS of ':=' is different from the 's' in 'omega[s]' or 'omega['s']'.

s NULL:= omega[sl]/omega[s];

Error, recursive assignment

 

s ``:= omega[sl]/omega['s'];

Error, recursive assignment

 

 

 


 

Download Q_20200621.mw

First 7 8 9 10 11 12 Page 9 of 12