On 10 Aug., 03:01, Aaron Meurer wrote:
> No. Right now, trigsimp() is very weak. It basically just applies
> the various forms of sin**2 + cos**2 = 1. Improvements would be
> welcome, though.
Rewriting as exp, simplifying, and rewriting as sin is sometimes more
powerful than our current trigsim
The problem lies in cse which is used to preprocess the expression by
trying to replace commonly occurring subexpressions with temporary
variables:
>>> eq=diff(theta(t), t)*sin(phi(t))*sin(psi(t))*sin(theta(t))
>>> cse(eq)
([(x0, theta(t))], [0])
The first list is the replacement that was used: t
Ondrej Certik wrote:
> On Tue, Jun 2, 2009 at 4:48 AM, Fabian Pedregosa wrote:
>> Luke wrote:
>>> I've published my branch of sympy where I started implementing the
>>> trig simplification algorithm by Hu et al. I also started working on
>>> the .eval() methods of sin, cos, and tan, and wrote a
On Tue, Jun 2, 2009 at 4:48 AM, Fabian Pedregosa wrote:
>
> Luke wrote:
>> I've published my branch of sympy where I started implementing the
>> trig simplification algorithm by Hu et al. I also started working on
>> the .eval() methods of sin, cos, and tan, and wrote a lot of tests for
>> the b
Luke wrote:
> I've published my branch of sympy where I started implementing the
> trig simplification algorithm by Hu et al. I also started working on
> the .eval() methods of sin, cos, and tan, and wrote a lot of tests for
> the behavior that Mathematica gives. Currently,
> py.test sympy/funct
You need to give arguments to the function. Most things that I have
tried in SymPy do not work with Functions unless they have arguments.
If you don't want arguments, just use a Symbol. I don't think implied
arguments (e.g., everything a function of t) has been implemented,
though it h
Aaron,
It seems like this only works for Symbol instances, not
FunctionClass instances, i.e:
>>> from sympy import *
>>> x = Function('x')
>>> a = Wild('a', exclude=[pi])
>>> b = Wild('b')
>>> e = pi/S(2) + x
>>> e.match(a*pi + b)
Traceback (most recent call last):
File "", line 1, in
File
Thanks.
On May 25, 9:02 pm, "Aaron S. Meurer" wrote:
> You need to use the exclude option I was telling you about. Do,
> >>> a = Wild('a', exclude=[pi])
> and
> >>> b = Wild('a', exclude=[pi]).
> and you get
> >>> e1.match(a*pi + b)
> {a_: 1, b_: x}
> >>> b = Wild('b', exclude=[pi])
> >>>
You need to use the exclude option I was telling you about. Do,
>>> a = Wild('a', exclude=[pi])
and
>>> b = Wild('a', exclude=[pi]).
and you get
>>> e1.match(a*pi + b)
{a_: 1, b_: x}
>>> b = Wild('b', exclude=[pi])
>>> e2.match(a*pi + b)
{b_: -x, a_: 1}
>>> e3.match(a*pi + b)
{b_: x, a_: -1
Luke wrote:
> Aaron,
> Thanks for the clarification. I think I get the idea, but I'm
> having trouble matching expressions of the following form:
> a = Wild('a')
> b = Wild('b')
> x = Symbol('x')
> e1 = pi + x
> e2 = pi - x
> e3 = -pi + x
> e4 = -pi - x
>
> I would think that for e{1,2,3,4} tha
Aaron,
Thanks for the clarification. I think I get the idea, but I'm
having trouble matching expressions of the following form:
a = Wild('a')
b = Wild('b')
x = Symbol('x')
e1 = pi + x
e2 = pi - x
e3 = -pi + x
e4 = -pi - x
I would think that for e{1,2,3,4} that I could get the following
behavio
On May 25, 2009, at 11:56 AM, Luke wrote:
>
> Here is the link for the Maxima trigsimp() code. It was written in
> 1981, according to the comments!!!
> http://maxima.cvs.sourceforge.net/viewvc/maxima/maxima/share/trigonometry/trgsmp.mac?revision=1.4&view=markup
>
> I emailed the authors of the F
Here is the link for the Maxima trigsimp() code. It was written in
1981, according to the comments!!!
http://maxima.cvs.sourceforge.net/viewvc/maxima/maxima/share/trigonometry/trgsmp.mac?revision=1.4&view=markup
I emailed the authors of the Fu et al. paper to see if they would be
willing to shar
Luke wrote:
> I tried both of those options and had no luck :(
>
> Have you looked at the paper by Fu, Zhong, and Zeng:
> http://vv.cn/d/d.aspx?Id=21987_1.0.42119
>
> I read it, and think it seemed reasonable, but I'm no expert and want
> to see what else was out there... maybe there are other app
I tried both of those options and had no luck :(
Have you looked at the paper by Fu, Zhong, and Zeng:
http://vv.cn/d/d.aspx?Id=21987_1.0.42119
I read it, and think it seemed reasonable, but I'm no expert and want
to see what else was out there... maybe there are other approaches
worth considerin
On Wed, May 20, 2009 at 7:29 AM, Luke wrote:
>
> Last night I was deriving the moment of inertia for a solid torus
> using Sympy. It mostly worked, except for the step where the
> determinant of the Jacobian for the change of variables mapping was to
> be computed, the result was unable to be s
Luke wrote:
> Last night I was deriving the moment of inertia for a solid torus
> using Sympy. It mostly worked, except for the step where the
> determinant of the Jacobian for the change of variables mapping was to
> be computed, the result was unable to be simplified by trigsimp. I
> gave it
On Tue, Apr 28, 2009 at 6:17 PM, Alan Bromborsky wrote:
>
> Luke wrote:
>> I just finished reading this paper. It seems pretty reasonable, and
>> not to difficult to implement. Does anybody know of any other papers
>> on this subject that might offer alternative methods that would be
>> worth l
Luke wrote:
> I just finished reading this paper. It seems pretty reasonable, and
> not to difficult to implement. Does anybody know of any other papers
> on this subject that might offer alternative methods that would be
> worth looking at? If there was some sort of gold standard paper on
> th
I just finished reading this paper. It seems pretty reasonable, and
not to difficult to implement. Does anybody know of any other papers
on this subject that might offer alternative methods that would be
worth looking at? If there was some sort of gold standard paper on
the subject, that might
On Tue, Apr 28, 2009 at 12:32 PM, Ondrej Certik wrote:
> On Tue, Apr 28, 2009 at 11:44 AM, Akshay Srinivasan
> wrote:
>>
>> Freddie Witherden wrote:
>>> Hi all,
>>>
I think trigsimp is too hack-ish. I'll try implementing the algorithm
given at http://vv.cn/d/d.aspx?Id=21987_1.0.42119 -
On Tue, Apr 28, 2009 at 11:44 AM, Akshay Srinivasan
wrote:
>
> Freddie Witherden wrote:
>> Hi all,
>>
>>> I think trigsimp is too hack-ish. I'll try implementing the algorithm
>>> given at http://vv.cn/d/d.aspx?Id=21987_1.0.42119 - I guess this is
>>> the one Ondrej was talking about - in the com
Freddie Witherden wrote:
> Hi all,
>
>> I think trigsimp is too hack-ish. I'll try implementing the algorithm
>> given at http://vv.cn/d/d.aspx?Id=21987_1.0.42119 - I guess this is
>> the one Ondrej was talking about - in the coming weeks. I'm still not
>> sure how good it is, does anyone know of
Hi all,
I think trigsimp is too hack-ish. I'll try implementing the algorithm
given at http://vv.cn/d/d.aspx?Id=21987_1.0.42119 - I guess this is
the one Ondrej was talking about - in the coming weeks. I'm still not
sure how good it is, does anyone know of anything better ?
Look at my proposal
Luke wrote:
> It isn't too pressing for PyDy, I just ran into it when creating some
> tests that would ensure PyDy gave the same output as Autolev. In
> Autolev, if you express a UnitVector from one reference in the
> coordinates of another reference frame that is 3 or more simple
> rotations awa
It isn't too pressing for PyDy, I just ran into it when creating some
tests that would ensure PyDy gave the same output as Autolev. In
Autolev, if you express a UnitVector from one reference in the
coordinates of another reference frame that is 3 or more simple
rotations away, when you convert th
I think trigsimp is too hack-ish. I'll try implementing the algorithm
given at http://vv.cn/d/d.aspx?Id=21987_1.0.42119 - I guess this is
the one Ondrej was talking about - in the coming weeks. I'm still not
sure how good it is, does anyone know of anything better ?
Akshay
On Apr 28, 6:52 pm, A
Ondrej Certik wrote:
> On Tue, Apr 28, 2009 at 12:22 AM, Luke wrote:
>
>> I'm writing some tests for some code that expresses a Vector expression in
>> the coordinates of a different frame. I am using Sympy's trigsimp to
>> simplify expressions, but the following Sympy expression isn't
>> trig
On Tue, Apr 28, 2009 at 12:22 AM, Luke wrote:
> I'm writing some tests for some code that expresses a Vector expression in
> the coordinates of a different frame. I am using Sympy's trigsimp to
> simplify expressions, but the following Sympy expression isn't
> trigsimplifying:
> cos(q4)**2 + sin
Incidentally, trying trigsimp with recursive=True, deep=True, or both True
didn't give the desired result.
On Tue, Apr 28, 2009 at 12:22 AM, Luke wrote:
> I'm writing some tests for some code that expresses a Vector expression in
> the coordinates of a different frame. I am using Sympy's trigsi
Ondrej Certik wrote:
> On Mon, Nov 10, 2008 at 10:29 PM, Alan Bromborsky <[EMAIL PROTECTED]> wrote:
>
>> How hard would it be to have trigsimp handle hyperbolic trig functions
>> as well as the ordinary ones?
>>
>
> I think the code should be similar to what is already implemented,
> howev
On Mon, Nov 10, 2008 at 10:29 PM, Alan Bromborsky <[EMAIL PROTECTED]> wrote:
>
> How hard would it be to have trigsimp handle hyperbolic trig functions
> as well as the ordinary ones?
I think the code should be similar to what is already implemented,
however someone needs to do it. Could you plea
On Sat, Nov 1, 2008 at 9:43 PM, Alan Bromborsky <[EMAIL PROTECTED]> wrote:
>
> Trigsimp should also simplify hyperbolic trigonometric functions!
Please report a new issue for that, describing the problems with some
failing examples.
Thanks,
Ondrej
--~--~-~--~~~---~--
33 matches
Mail list logo