Amir Saman Mir

85 Reputation

3 Badges

4 years, 262 days

MaplePrimes Activity


These are replies submitted by Amir Saman Mir

@dharr Thanks so much  Dr.Harrington

@ecterrab  so i see the problem here , thanks for the help

@mmcdara thanks for your time, actually what I meant by a general function was something as general as Maple "Coefficient" function and as functional as your code, for example, what if I want the coeff of  instead of  so I'm looking for a more general solution if it exists.

-also the problem with "rho" that isn't factored out by the "collect" function is that it's going to be a matrix so i declare it as a non-commutative parameter in the Setup function

@mmcdara  thanks for the code , but can this be written in a more general way ,like for instance a function that takes an input as the parameter which its coefficients are desired and outputs its coefficients 

@dharr  thanks a lot for the answer

@Carl Love   Sweet! it worked , thanks for your answer

 

 

 

Hey there, is there any way to define an index for the generalized Unit vector like the following

_u_[i]

which then the following becomes true 

type(_u_[i], PhysicsUnitVectors)

 

@dharr thanks for your answer, i dont know why I get the wrong one, but your code works

@dharr  thanks for your answer , actually the answer which stated in the book for cos(theta2) is 

cos(theta[2])=(qx^2 + qy^2 - a[1]^2 - a[2]^2)/((2*a[1])*a[2])

which qx and qy are calculated from know variables and are

-sin(phi)*a[3] + py = qy

-cos(phi)*a[3] + px = qx

but this is what is received from maple for cos(theta[2])

cos(theta[2]) = (qx^2 + qy^2 - a[1]^2 - a[2]^2)*1/a[1]*1/a[2]*1/sqrt(qy^2*((qx^2 + qy^2 + a[1]^2 - a[2]^2)*sqrt(-qy^2*(qx^2 + qy^2 - a[1]^2 + (2*a[1])*a[2] - a[2]^2)*(qx^2 + qy^2 - a[1]^2 - (2*a[1])*a[2] - a[2]^2)) + (qx^2 + (qy + a[1] + a[2])*(qy - a[1] - a[2]))*qx*(qx^2 + (qy + a[1] - a[2])*(qy - a[1] + a[2])))^2*1/a[1]^2*1/a[2]^2*1/(-qx*sqrt(-qy^2*(qx^2 + qy^2 - a[1]^2 + (2*a[1])*a[2] - a[2]^2)*(qx^2 + qy^2 - a[1]^2 - (2*a[1])*a[2] - a[2]^2)) + qy^2*(qx^2 + qy^2 + a[1]^2 - a[2]^2))^2 + (qx^2 + qy^2 - a[1]^2 - a[2]^2)^2*1/a[1]^2*1/a[2]^2)

which is

cos(theta[2]) = (qx^2 + qy^2 - a[1]^2 - a[2]^2)*1/a[1]*1/a[2]*1/sqrt(qy^2*((qx^2 + qy^2 + a[1]^2 - a[2]^2)*sqrt(-qy^2*(qx^2 + qy^2 - a[1]^2 + (2*a[1])*a[2] - a[2]^2)*(qx^2 + qy^2 - a[1]^2 - (2*a[1])*a[2] - a[2]^2)) + (qx^2 + (qy + a[1] + a[2])*(qy - a[1] - a[2]))*qx*(qx^2 + (qy + a[1] - a[2])*(qy - a[1] + a[2])))^2*1/a[1]^2*1/a[2]^2*1/(-qx*sqrt(-qy^2*(qx^2 + qy^2 - a[1]^2 + (2*a[1])*a[2] - a[2]^2)*(qx^2 + qy^2 - a[1]^2 - (2*a[1])*a[2] - a[2]^2)) + qy^2*(qx^2 + qy^2 + a[1]^2 - a[2]^2))^2 + (qx^2 + qy^2 - a[1]^2 - a[2]^2)^2*1/a[1]^2*1/a[2]^2)

this means that the denominator of the maple solution must simplify to 2a[1]a[2] but I can't reach that

what am I doing wrong here,

@Carl Love Now that's more efficient, thanks!

@acer  Great! thanks for the answer.

@Carl Love  thanks for your time and the tricky answer!

@vv thanks for your answer

@tomleslie  thanks for your time

@vv  thanks for your answer, so do you know how can I substitute a*b in a*b*c  in the physics environment?

Page 1 of 1