[Date Index]
[Thread Index]
[Author Index]
Re: Mathematica: Long divison for polynomials
*To*: mathgroup at smc.vnet.net
*Subject*: [mg83816] Re: [mg83772] Mathematica: Long divison for polynomials
*From*: Andrzej Kozlowski <akoz at mimuw.edu.pl>
*Date*: Sat, 1 Dec 2007 05:45:33 -0500 (EST)
*References*: <200711301018.FAA04867@smc.vnet.net>
On 30 Nov 2007, at 19:18, Caren Balea wrote:
> Dear all,
>
> I would like to perform long division for a polynomial
> using Mathematica.
> I came across the command "PolynomialQuotient".
>
> If I consider a function
> f(x) = g(x)/h(x)
> where degree g(x) > h(x) then I can use PolynomialQuotient
> to do the job - no problem.
>
> Now, say, I have
> f(x) = 1/h(x)
> where
> h(x) = 1 + a_1 x + a_2 x^2 + a_3 x^3 + a_4 x^4
> and I want to do long division for f(x).
>
> So, I enter
>
> g[x_] := 1
> h[x_] := 1 + a1*x + a2*x^2 + a3*x^3 + a4*x^4
> k[x_] = PolynomialQuotient[g[x], h[x], x]
>
> and obtain
> 0.
>
> Which is correct - *but*
> g(x)/h(x) can be also written as
> g(x)/h(x) = 1 - a1*x + (a1^2 - a2)*x^2 + ...
>
> How do I obtain the last expression?
> Which command do I need to use?
>
> Thank you,
> Caren
>
Normal[1/(1 + a1*x + a2*x^2 + a3*x^3 + a4*x^4) +
O[x]^4]
(-a1^3 + 2*a2*a1 - a3)*x^3 + (a1^2 - a2)*x^2 - a1*x + 1
If you want the general term you can try (in Mathematica 6)
SeriesCoefficient[1/(a4 x^4 + a3 x^3 + a2 x^2 + a1 x + 1), {x, 0, n}]
though I have no idea if the complicated answer returned is correct.
Andrzej Kozlowski
Prev by Date:
**Re: Contour levels**
Next by Date:
**Re: Contour levels**
Previous by thread:
**Re: Mathematica: Long divison for polynomials**
Next by thread:
**Re: Mathematica: Long divison for polynomials**
| |