I want to apply the double angle formula to a simple expression. Here is an example of what I want to do
>>>f = 2*cos(u)*sin(u) >>> trigsimp(f) 2*cos(u)*sin(u) Except I would like trigsimp(f) to be 'sin(2u)'. My specific problem is finding the max tangential acceleration in a circle when the velocity is defined by >>> v = v0*sin(pi*s/s0) and the tangential acceleration is >>> at = v*diff(v,s) pi*v0**2*cos(pi*s/s0)*sin(pi*s/s0)/s0 I then want to apply the double angle formula, because picking the maximum is as easy as solving sin(u)=1, but this is what I get >>> at_simp = trigsimp(at) pi*v0**2*cos(pi*s/s0)*sin(pi*s/s0)/s0 I tried the TrigSimp() defined in Issue 1181, but it didn't help any. Also, say I get something working where it will simplify the expression via the double angle formula and I have x*sin(2*u), but I know that I want sin(u) to equal 1. Is there any way to extract sin (2*u) from the expression. The only way I can think of off the top of my head is to do something like >>> f = x*sin(2*u) >>> solve(f.args[1]-1,u) [pi/4] Is this the 'sympy' way of doing it? Any help comments or suggestions will be appreciated. Thanks, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---
