Thanks rickhg12hs. 

Rakhi

On Thursday, August 1, 2013 1:28:53 PM UTC+5:30, rickhg12hs wrote:
>
> On Thursday, August 1, 2013 1:50:32 AM UTC-4, Rakhi Warriar wrote:
>
>> I have the following function:
>>
>> f(x) =         1
>>          ----------------
>>          x^2 + 4*x + 13
>>
>> I need to find its partial fraction expansion. As the factors are complex 
>> conjugates, I am not able to do using partial_fraction(). How can I find 
>> this?
>>
>> Commands:
>> x = CC['x'].0
>> f = 1/(x^2 + 4*x+ 13)
>> f.partial_fraction()
>> this gives error:
>> Traceback (click to the left of this block for traceback)
>> ...
>> AttributeError: 'FractionFieldElement_1poly_field' object has no
>> attribute 'partial_fraction'
>>
> With Sage 5.10:
>
> sage: P.<x>=CC[]
> sage: f=1/(x^2+4*x+13)
> sage: f
> 1.00000000000000/(x^2 + 4.00000000000000*x + 13.0000000000000)
> sage: f.partial_fraction_decomposition()
> (0,
>  [(-0.166666666666667*I)/(x + 2.00000000000000 - 3.00000000000000*I),
>   0.166666666666667*I/(x + 2.00000000000000 + 3.00000000000000*I)])
> sage: f.partial_fraction_decomposition()[1]
> [(-0.166666666666667*I)/(x + 2.00000000000000 - 3.00000000000000*I),
>  0.166666666666667*I/(x + 2.00000000000000 + 3.00000000000000*I)]
> sage: sum(f.partial_fraction_decomposition()[1])
> 1.00000000000000/(x^2 + 4.00000000000000*x + 13.0000000000000)
> sage: f == sum(f.partial_fraction_decomposition()[1])
> True
> sage: 
>  
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to