Hi Bill,

On Mon, Feb 16, 2009 at 7:32 PM, flyeng4 <williamhpurc...@gmail.com> wrote:
>
> 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.

Yes, this is not implemented yet.

> 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?

You simple want to solve the equation sin(2*u) == 1, right? I would do
it the same way.

>
> Any help comments or suggestions will be appreciated.

Thanks for your interest. If you have some idea how to improve our
trigsimp() to handle your case as well, it'd be really awesome.

Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to