help factorising an equation

39 views
Skip to first unread message

lkcl .

unread,
Mar 24, 2014, 9:36:03 AM3/24/14
to sy...@googlegroups.com
hi folks, i'm an experienced software engineer wandering into unchartered mathematical territory, and i've set myself a challenge to reverse-engineer the properties of the electron.  the referenced PNG http://lkcl.net/moment_formula.png (easiest way to show it) is a screenshot of a formula that i'd like to factorise into the form 1 + a0 * x + a1 * x^2 + a2 * x^3 .... where x needs to be the *specific* value "alpha / (2 * pi)".  this allows it to be compared against QED's formula for the electron magnetic moment which, if this formula could be shown to be a potential (accidental) factorisation of the enormously-complex equation from QED would be a really rather large hairy deal.

now, i'm aware that simpy has the ability to expand out equations including sine, exp and to express equations as a power series in x like that but what i _don't_ know is if it can be done where x must be in terms of two (or in this case 3) related constants.

first question, then: can simpy do this type of factorisation?  second question: if not, what (possibly iterative) approach could be taken to twist scipy's arm into doing the job?

if i'm absolutely honest i have no clue where to start here, so could really use some pointers to examples and so on.  if anyone _can_ help then i am more than willing to formally give credit in the paper i'm writing up.

many thanks,

l.

p.s. there _is_ a precise mathematical formula (another power series) for alpha-infinity, if that helps at all, not sure if it does but i mention it anyway just in case.
p.p.s. hmm let's see if google groups allows images to be put inline into text... it does!  ok that may help.


Ondřej Čertík

unread,
Mar 24, 2014, 11:24:39 AM3/24/14
to sympy
Hi Luke,


On Mon, Mar 24, 2014 at 7:36 AM, lkcl . <luke.l...@gmail.com> wrote:
hi folks, i'm an experienced software engineer wandering into unchartered mathematical territory, and i've set myself a challenge to reverse-engineer the properties of the electron.  the referenced PNG http://lkcl.net/moment_formula.png (easiest way to show it) is a screenshot of a formula that i'd like to factorise into the form 1 + a0 * x + a1 * x^2 + a2 * x^3 .... where x needs to be the *specific* value "alpha / (2 * pi)".  this allows it to be compared against QED's formula for the electron magnetic moment which, if this formula could be shown to be a potential (accidental) factorisation of the enormously-complex equation from QED would be a really rather large hairy deal.

now, i'm aware that simpy has the ability to expand out equations including sine, exp and to express equations as a power series in x like that but what i _don't_ know is if it can be done where x must be in terms of two (or in this case 3) related constants.

first question, then: can simpy do this type of factorisation?  second question: if not, what (possibly iterative) approach could be taken to twist scipy's arm into doing the job?

Can you define what you are trying to expand with respect to what? Your "alpha", is it "alpha_oo" in the picture you sent? Are you trying to expand "mu_e" with respect to alpha? That will give you a series like:

a0 + a1*alpha + a2*alpha^2

and then you can trivially divide each a0, a1, a2 by a power of (2*pi) to get the series that you want. Yes, sympy should be able to do that.

Ondrej

P.S. The project name is sympy, as in "symbolic python", not simpy.
 

if i'm absolutely honest i have no clue where to start here, so could really use some pointers to examples and so on.  if anyone _can_ help then i am more than willing to formally give credit in the paper i'm writing up.

many thanks,

l.

p.s. there _is_ a precise mathematical formula (another power series) for alpha-infinity, if that helps at all, not sure if it does but i mention it anyway just in case.
p.p.s. hmm let's see if google groups allows images to be put inline into text... it does!  ok that may help.


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b758029a-3c98-4a82-92ff-38c1f2873264%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lkcl .

unread,
Mar 24, 2014, 5:50:53 PM3/24/14
to sy...@googlegroups.com


On Monday, March 24, 2014 3:24:39 PM UTC, Ondřej Čertík wrote:

hi ondrej, thanks for replying, nice to see you're around in a different context, i remember your name vividly but not why :)
 
Can you define what you are trying to expand with respect to what? Your "alpha", is it "alpha_oo" in the picture you sent?

yes.
 
Are you trying to expand "mu_e" with respect to alpha?

alpha/2pi, yes.
 
That will give you a series like:

a0 + a1*alpha + a2*alpha^2


yep.
 
and then you can trivially divide each a0, a1, a2 by a power of (2*pi) to get the series that you want. Yes, sympy should be able to do that.


that hadn't occurred to me to do it that way.  what i wanted to do was to try to preserve the expressions for each of a0, a1, a2, algebraically, but it's turning out to be uh... either rather cpu-intensive or just plain odd.

instead i started evaluating the fractions into floating-point coefficients, but that then entirely defeated the object of the exercise, as absolutely any floating-point coefficients could be picked for a0, a1, a2... a15 etc.

what this _has_ taught me is that i'm simply taking the wrong approach.  which is useful information in itself.

 
Ondrej

P.S. The project name is sympy, as in "symbolic python", not simpy.

whoops, that'd explain why my google searches went awry once or twice :)
 
l.

Ondřej Čertík

unread,
Mar 24, 2014, 7:06:40 PM3/24/14
to sympy
Hi Luke,

On Mon, Mar 24, 2014 at 3:50 PM, lkcl . <luke.l...@gmail.com> wrote:
>
>
> On Monday, March 24, 2014 3:24:39 PM UTC, Ondřej Čertík wrote:
>
> hi ondrej, thanks for replying, nice to see you're around in a different
> context, i remember your name vividly but not why :)

From the http://pyjs.org/ project. Nice to see you too!

>
>>
>> Can you define what you are trying to expand with respect to what? Your
>> "alpha", is it "alpha_oo" in the picture you sent?
>
>
> yes.
>
>>
>> Are you trying to expand "mu_e" with respect to alpha?
>
>
> alpha/2pi, yes.
>
>>
>> That will give you a series like:
>>
>> a0 + a1*alpha + a2*alpha^2
>>
>
> yep.
>
>>
>> and then you can trivially divide each a0, a1, a2 by a power of (2*pi) to
>> get the series that you want. Yes, sympy should be able to do that.
>>
>
> that hadn't occurred to me to do it that way. what i wanted to do was to
> try to preserve the expressions for each of a0, a1, a2, algebraically, but
> it's turning out to be uh... either rather cpu-intensive or just plain odd.

Can you post your code? Let's have a look.

>
> instead i started evaluating the fractions into floating-point coefficients,
> but that then entirely defeated the object of the exercise, as absolutely
> any floating-point coefficients could be picked for a0, a1, a2... a15 etc.
>
> what this _has_ taught me is that i'm simply taking the wrong approach.
> which is useful information in itself.

Let's figure out the symbolic approach first. The formula you posted should be
easy for sympy, but maybe it will be clear after you post your code.

Ondrej

>
>
>>
>> Ondrej
>>
>> P.S. The project name is sympy, as in "symbolic python", not simpy.
>
>
> whoops, that'd explain why my google searches went awry once or twice :)
>
> l.
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/d99deac5-3840-41ac-9933-1c567972c5d8%40googlegroups.com.

Aaron Meurer

unread,
Mar 24, 2014, 9:36:50 PM3/24/14
to sy...@googlegroups.com
Maybe I'm not fully understanding what you want, but are you just looking for the series method? http://docs.sympy.org/latest/modules/core.html#sympy.core.expr.Expr.series

Aaron Meurer


--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
Reply all
Reply to author
Forward
0 new messages