[sympy] Testing an expression

2016-05-05 Thread Alex Lindsay
I am trying to build a rule for manual integration. I want to test whether an expression matches the general form: c (e + f x)**p where c, f, and p can be non-zero expressions not containing x, whereas e can be zero but again cannot contain x. Moreover, if the expressions matches the above

Re: [sympy] Re: Manipulating expressions with vectors

2016-01-20 Thread Alex Lindsay
Looks neat. I will have to delve into it more. Thanks! On 01/16/2016 06:37 PM, brombo wrote: You may want to look at my geometric algebra module that uses sympy (github.com/brombo/galgebra) and see if it does what you want it to. I have attached the manual (galgebra.pdf) for you to look at.

Re: [sympy] Re: Manipulating expressions with vectors

2016-01-20 Thread Alex Lindsay
I like that :-) That's probably actually all I need for this case On 01/18/2016 10:36 AM, Francesco Bonazzi wrote: On Friday, 15 January 2016 17:04:20 UTC+1, Alexander Lindsay wrote: and carry them around in expressions that way because I want to *avoid* simplifications like (C is

Re: [sympy] Manipulating expressions with vectors

2016-01-15 Thread Alex Lindsay
Neat. I'll be monitoring to see when the PR is merged! On 01/15/2016 11:08 AM, Aaron Meurer wrote: There is some work in progress to create a DotProduct for matrix expressions, which should do what you want here https://github.com/sympy/sympy/pull/10252. Aaron Meurer On Fri, Jan 15, 2016 at

Re: [sympy] Bug with substituting derivatives

2015-05-19 Thread Alex Lindsay
Not to hijack this post, but why does subs(phi(z,t).diff(z),...) work when phi(z,t).diff(t,2) does not contain any derivatives of phi with respect to z? It seems like this substitution is saying that phi(z,t).diff(z) = phi(z,t) I'm new to sympy, so I apologize if this is a stupid question.

[sympy] Re: Derivatives of gradients

2015-05-06 Thread Alex Lindsay
I realized that what I wrote here is nonsensical. I can't commute partial / partial_u through the gradient operator! Silly me On 05/05/2015 02:11 PM, Alex Lindsay wrote: Hi all, I have the following problem. I am trying to set-up the Jacobian matrix for a finite element problem in a different

[sympy] Editing documentation

2015-05-05 Thread Alex Lindsay
What's the best way to edit the sympy documentation? Fork the sympy_doc repository and then do a pull request? The edit I want to make now is very simple: in the physics/fields gradient documentation, I want to change To compute the divergence of a vector field... to To compute the divergence

[sympy] Derivatives of gradients

2015-05-05 Thread Alex Lindsay
Hi all, I have the following problem. I am trying to set-up the Jacobian matrix for a finite element problem in a different software package and I need to compute some partial derivatives like the one below: In order to evaluate this I need sympy to be able to do the following relationship: