matmxhu

75 Reputation

5 Badges

12 years, 41 days

MaplePrimes Activity


These are questions asked by matmxhu

hi,

    In my note,i use Simplify or map(Simplify,eqs) to make the expression more simple,but i meet a fail,the answers i got lies two diffrent between Eq.(8) and Eq.(9) caused by last term ,i guess it's a bug in using Physics package,if not,how can i do, please tell me.

thanks.

NULL

restart; with(Physics); Setup(mathematicalnotation = true); Physics:-Version()[2]

`2014, January 6, 3:40 hours`

(1)

Setup(op = {a, ap})

`* Partial match of  'op' against keyword 'quantumoperators'`

 

[quantumoperators = {a, ap}]

(2)

ap := Dagger(a)

Physics:-Dagger(a)

(3)

Setup(alg = {%Commutator(a, ap) = 1})

`* Partial match of  'alg' against keyword 'algebrarules'`

 

[algebrarules = {%Commutator(a, %Dagger(a)) = 1}]

(4)

``

N := Physics:-`*`(ap, a)

Physics:-`*`(Physics:-Dagger(a), a)

(5)

K__0 := Physics:-`*`(ap, a)+1/2; 1; K__d := Physics:-`*`(a, sqrt(N)); 1; K__u := Dagger(K__d)

Physics:-`*`(Physics:-Dagger(a), a)+1/2

 

Physics:-`*`(a, Physics:-`*`(Physics:-Dagger(a), a)^(1/2))

 

Physics:-`*`(Physics:-`*`(Physics:-Dagger(a), a)^(1/2), Physics:-Dagger(a))

(6)

C := K__0^2-Physics:-`*`(Physics:-`*`(K__d, K__u)+Physics:-`*`(K__u, K__d), 1/2)

Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a)+1/2, 2)-(1/2)*Physics:-`*`(a, Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/2)*Physics:-`*`(Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2), Physics:-Dagger(a), a, Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2))

(7)

ans1 := Simplify(C)

1/4-(3/2)*Physics:-`*`(a, Physics:-Dagger(a))+(1/2)*Physics:-`*`(Physics:-`^`(a, 2), Physics:-`^`(Physics:-Dagger(a), 2))-(1/2)*Physics:-`^`(-1+Physics:-`*`(a, Physics:-Dagger(a)), 3/2)

(8)

ans2 := map(Simplify, C)

1/4-2*Physics:-`*`(a, Physics:-Dagger(a))+Physics:-`*`(Physics:-`^`(a, 2), Physics:-`^`(Physics:-Dagger(a), 2))-(1/2)*Physics:-`*`(a, Physics:-Dagger(a), a, Physics:-Dagger(a))-(1/2)*Physics:-`*`(Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2), Physics:-Dagger(a), a, Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2))

(9)

Term3 := op(3, C)

-(1/2)*Physics:-`*`(Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2), Physics:-Dagger(a), a, Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2))

(10)

Simplify(Term3) = -Physics:-`*`(Physics:-`*`(ap, a)^2, 1/2)

-(1/2)*Physics:-`*`(Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2), Physics:-Dagger(a), a, Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 1/2)) = -(1/2)*Physics:-`^`(Physics:-`*`(Physics:-Dagger(a), a), 2)

(11)

ans3 := Simplify(subsop(3 = -Physics:-`*`(Physics:-`*`(ap, a)^2, 1/2), C))

-1/4

(12)

  
"here,we can find a quite difference between Eq.(8) and Eq.(9)."

obviously,there lies a wrong result at last term in Eq.(8).

  The question is how we can simplify the style as last term in Eq.(9) even the soft can work correctly.

  yes,i want get a result from lhs(11) to rhs(11) through 'Simplify',in fact,in quantum operator computation,we can meet much more like sqrt(ap*a)*ap*a*sqrt(ap*a),exp(ap*a)*ap*a*exp(-ap*a),sin(ap*a)*a*ap*sin(ap*a),etc.if happen,can we  make this more simple with soft?

 

NULL

NULL



Download question_13.12.29.mw

hi,

     there is a common  differential equation in my maple note,the solution of the eq. can be expressed by

associated Legendre function(s),but i get a result by hypergeometric representation.how i can translate the later into a  single Legendre fun?

 Thank you in advance  

ode := 'sin(theta)*(diff(sin(theta)*(diff(Theta(theta), theta)), theta))'/Theta(theta)+l*(l+1)*sin(theta)^2 = m^2

sin(theta)*(diff(sin(theta)*(diff(Theta(theta), theta)), theta))/Theta(theta)+l*(l+1)*sin(theta)^2 = m^2

(1)

dsolve(ode)

Theta(theta) = _C1*((1/2)*cos(2*theta)-1/2)^((1/2)*m)*sin(2*theta)*hypergeom([(1/2)*m+(1/2)*l+1, (1/2)*m-(1/2)*l+1/2], [3/2], (1/2)*cos(2*theta)+1/2)/(1-cos(2*theta))^(1/2)+_C2*hypergeom([(1/2)*m-(1/2)*l, (1/2)*m+(1/2)*l+1/2], [1/2], (1/2)*cos(2*theta)+1/2)*(-2*cos(2*theta)+2)^(1/2)*((1/2)*cos(2*theta)-1/2)^((1/2)*m)/(1-cos(2*theta))^(1/2)

(2)

`assuming`([simplify(dsolve(ode))], [l::posint, m::integer, l >= m])

Theta(theta) = ((1/2)*cos(2*theta)-1/2)^((1/2)*m)*(sin(2*theta)*hypergeom([(1/2)*m+(1/2)*l+1, (1/2)*m-(1/2)*l+1/2], [3/2], (1/2)*cos(2*theta)+1/2)*_C1+2^(1/2)*(1-cos(2*theta))^(1/2)*hypergeom([(1/2)*m-(1/2)*l, (1/2)*m+(1/2)*l+1/2], [1/2], (1/2)*cos(2*theta)+1/2)*_C2)/(1-cos(2*theta))^(1/2)

(3)

convert(Theta(theta) = _C1*((1/2)*cos(2*theta)-1/2)^((1/2)*m)*sin(2*theta)*hypergeom([(1/2)*m+(1/2)*l+1, (1/2)*m-(1/2)*l+1/2], [3/2], (1/2)*cos(2*theta)+1/2)/(1-cos(2*theta))^(1/2)+_C2*hypergeom([(1/2)*m-(1/2)*l, (1/2)*m+(1/2)*l+1/2], [1/2], (1/2)*cos(2*theta)+1/2)*(-2*cos(2*theta)+2)^(1/2)*((1/2)*cos(2*theta)-1/2)^((1/2)*m)/(1-cos(2*theta))^(1/2), `2F1`)

Theta(theta) = (1/2)*_C1*((1/2)*cos(2*theta)-1/2)^((1/2)*m)*sin(2*theta)*Pi^(1/2)*GAMMA(-(1/2)*m-(1/2)*l)*JacobiP(-(1/2)*m-(1/2)*l-1, 1/2, m, -cos(2*theta))/((1-cos(2*theta))^(1/2)*GAMMA(1/2-(1/2)*m-(1/2)*l))+_C2*Pi^(1/2)*GAMMA(1-(1/2)*m+(1/2)*l)*JacobiP(-(1/2)*m+(1/2)*l, -1/2, m, -cos(2*theta))*(-2*cos(2*theta)+2)^(1/2)*((1/2)*cos(2*theta)-1/2)^((1/2)*m)/((1-cos(2*theta))^(1/2)*GAMMA(-(1/2)*m+(1/2)*l+1/2))

(4)

``

 

Download question_12.19.mw

 

``

-(-2*N__1*`ω__2`*`ω__1`^2*lambda-8*N__2*lambda^3*`ω__2`-sqrt(4*N__1^2*lambda^2*`ω__1`^2*`ω__2`^2+16*N__1*N__2*lambda^4*`ω__2`^2+N__1*N__2*`ω__1`^2*`ω__2`^4+4*N__2^2*lambda^2*`ω__2`^4)*`ω__1`)/(4*N__1*lambda*`ω__1`^2*`ω__2`+16*N__2*lambda^3*`ω__2`)

-(-2*N__1*`ω__2`*`ω__1`^2*lambda-8*N__2*lambda^3*`ω__2`-(4*N__1^2*lambda^2*`ω__1`^2*`ω__2`^2+16*N__1*N__2*lambda^4*`ω__2`^2+N__1*N__2*`ω__1`^2*`ω__2`^4+4*N__2^2*lambda^2*`ω__2`^4)^(1/2)*`ω__1`)/(4*N__1*lambda*`ω__1`^2*`ω__2`+16*N__2*lambda^3*`ω__2`)

(1)

`assuming`([simplify(-(-2*N__1*`ω__2`*`ω__1`^2*lambda-8*N__2*lambda^3*`ω__2`-(4*N__1^2*lambda^2*`ω__1`^2*`ω__2`^2+16*N__1*N__2*lambda^4*`ω__2`^2+N__1*N__2*`ω__1`^2*`ω__2`^4+4*N__2^2*lambda^2*`ω__2`^4)^(1/2)*`ω__1`)/(4*N__1*lambda*`ω__1`^2*`ω__2`+16*N__2*lambda^3*`ω__2`), 'size')], [all, positive])

(1/4)*(4^(1/2)*((N__1*lambda^2+(1/4)*N__2*`ω__2`^2)*`ω__2`^2*(N__1*`ω__1`^2+4*N__2*lambda^2))^(1/2)*`ω__1`+2*lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2))/(lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2))

(2)

`assuming`([combine((1/4)*(4^(1/2)*((N__1*lambda^2+(1/4)*N__2*`ω__2`^2)*`ω__2`^2*(N__1*`ω__1`^2+4*N__2*lambda^2))^(1/2)*`ω__1`+2*lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2))/(lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2)), 'size')], [N__1 > 0, N__2 > 0, `ω__1` > 0, `ω__2` > 0, lambda > 0])

(1/4)*(`ω__1`*`ω__2`*((4*N__1*lambda^2+N__2*`ω__2`^2)*(N__1*`ω__1`^2+4*N__2*lambda^2))^(1/2)+2*lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2))/(lambda*`ω__2`*(N__1*`ω__1`^2+4*N__2*lambda^2))

(3)

 

``

``


Download question_13.12.06.mw

Dear,i meet a problem in Physics package.i can't find why i got two different answers.

restart; with(Physics); Setup(mathematicalnotation = true);Setup(op = {C});

Cp := Dagger(C);

alg := %Commutator(Cp, C) = -1;

Setup(alg)

S := sqrt(N-(Dagger(C)+sqrt(N)*conjugate(eta))*(C+sqrt(N)*eta)):

eq1 := collect(expand(op(1, S)), N):

xi = op(1, eq1);

f := map(simplify, map(proc (x) options operator, arrow; x*sqrt(xi) end proc, convert...

1 2 3 Page 3 of 3