Question: is this a weakness in simplify?

Wondering what the experts here think of this. Should not simplify have worked on this automatically? By trial and error, found that combine command is what simplified it the best.

But I think simplify should also have done the same.  

Interested to hear what others think, and why simplify (even using trig option) did not do it.   

The issue is that this is done in code, without lookin at the screen and deciding what to do based on what the expression "looks like".

interface(version);

`Standard Worksheet Interface, Maple 2025.0, Linux, March 24 2025 Build ID 1909157`

A:=(((sin(sqrt(3)/2)*sqrt(3) - 3*cos(sqrt(3)/2))*cos(sqrt(3)*x/2) - sin(sqrt(3)*x/2)*(sqrt(3)*cos(sqrt(3)/2) + 3*sin(sqrt(3)/2)))*exp(-1/2 + x/2))/3 ;

(1/3)*((sin((1/2)*3^(1/2))*3^(1/2)-3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)-sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

B:=- exp(-1/2 + x/2)*(sqrt(3)*sin(sqrt(3)*(x - 1)/2) + 3*cos(sqrt(3)*(x - 1)/2))/3;

-(1/3)*exp(-1/2+(1/2)*x)*(3^(1/2)*sin((1/2)*3^(1/2)*(x-1))+3*cos((1/2)*3^(1/2)*(x-1)))

simplify(A-B); #show these are same

0

simplify(A,trig)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(A)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(A,size)

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

simplify(normal(A))

-(1/3)*((-sin((1/2)*3^(1/2))*3^(1/2)+3*cos((1/2)*3^(1/2)))*cos((1/2)*3^(1/2)*x)+sin((1/2)*3^(1/2)*x)*(3^(1/2)*cos((1/2)*3^(1/2))+3*sin((1/2)*3^(1/2))))*exp(-1/2+(1/2)*x)

combine(A); #finally

(-(1/3)*3^(1/2)*sin((1/2)*3^(1/2)*(x-1))-cos((1/2)*3^(1/2)*(x-1)))*exp(-1/2+(1/2)*x)

 

 

Download simplify_vs_combine_june_4_2025.mw

Please Wait...