Re: help with polynomial solutions
- To: mathgroup at smc.vnet.net
- Subject: [mg81781] Re: help with polynomial solutions
- From: "David Park" <djmpark at comcast.net>
- Date: Wed, 3 Oct 2007 02:36:39 -0400 (EDT)
- References: <fdt3dv$rqj$1@smc.vnet.net>
You could use CoefficientList first and then Solve.
a x^2 + b x + c == x^2
First[%] - Last[%] == 0
MapAt[CoefficientList[#, x] &, %, 1] // Thread
Sort@First@Solve[%, {a, b, c}]
--
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/
"Jules P. Aronson" <aronson at nlm.nih.gov> wrote in message
news:fdt3dv$rqj$1 at smc.vnet.net...
>I could not get mathematica to solve the following class of problems.
>
> If f(x) and g(x) and two polynomials then a solution to force f(x) to be
> equal to g(x) is the equate the coefficients of f(x) to be the same as
> those of g(x). For example,
>
> a x^2 + b x + c == x^2, has a solution, a=1, b=0, c=0.
>
> If I do the following in mathematica:
>
> Solve[a x^2 + b x + c == x^2, {a,b,c}] or using Reduce, I do not get the
> desired solution.
>
> Can someone tell how to force mathematica to solve such problems.
>