Hi,

I'm sure this is straightforward enough yet I've not managed to work
out
how to do it so far from the documentation. I've asked this question
on the maxima mailing list and I believe it can do what I want.
However I do most of my work in python and would much prefer a python
based solution. Can sympy provide this? I've tried to use matching but
to no avail.

I have several functions of several variables, for instance, f(x, y,
z)
which I know can be written in the following form:

f(x, y, z) = g1(y, z) * h1(x) + g2(y, z) * h2(x) + g3(y, z) * h3(x)

where h1(x), h2(x) and h3(x) are known. How to get sympy to produce
g1(y, z), g2(y, z) and g3(y, z)?

For instance

f(x, mu, gamma): (- gamma * (x-mu)**2 - log(gamma) + log(2*pi)) / 2

So how can I ask sympy to decompose f as:

g1(mu, gamma) * x**2 + g2(mu, gamma) * x + g3(mu, gamma)

and

g1(x, gamma) * mu**2 + g2(x, gamma) * mu + g3(x, gamma)

and

g1(x, mu) * log(gamma) + g2(x, mu) * gamma + g3(x, mu)

Thanks in advance,
John.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to