Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Function to solve polynomial

  • To: mathgroup at smc.vnet.net
  • Subject: [mg71330] Re: [mg71298] Re: Function to solve polynomial
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Wed, 15 Nov 2006 06:43:30 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <ej42av$r0u$1@smc.vnet.net> <200611141006.FAA06667@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

Did I miss something?  What's wrong with the following?

   p[x_] = Expand[(x - 4)(x + 2)(x - 1)(x + 5)(x - 7)]
-280 + 194*x + 125*x^2 - 35*x^3 - 5*x^4 + x^5

   Solve[p[x] == 0, x]
{{x -> -5}, {x -> -2}, {x -> 1}, {x -> 4}, {x -> 7}}

All output was converted to InputForm.

dimitris wrote:

> a1b2c3d4 wrote:
>> I am trying to write a function that will help me solve the polynomial f(x)=(x-4)(x+2)(x-1)(x+5)(x-7) (NSolve and Solve functions not preferred)
>>
>> I can only think of this function:
>> solution := {Plot[{(x -4)(x + 2)(x - 1)(x + 5)(x - 7)}, {x, -10, 10}, AxesLabel -> TraditionalForm /@ {x, y}]}
>>
>> Does anyone have better knowledge than me in writing an automated program to solve this polynomial? Say For, While or Do Loop?
>>
>> Your help will be greatly appreciated.
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: List difference using patterns and substitutions.
  • Next by Date: FindInstance returning incorrect results
  • Previous by thread: Re: Function to solve polynomial
  • Next by thread: my favorite MathML output from Mathematica so far: