Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Creation and evaluation of polynomials

  • To: mathgroup at smc.vnet.net
  • Subject: [mg89436] Creation and evaluation of polynomials
  • From: jmgomezgoo at gmail.com
  • Date: Mon, 9 Jun 2008 06:19:30 -0400 (EDT)

Hi!

Image we have a function that create a Polynomial:

polynomial[{1,0,0,0,1,0,1,}] -> p^5 + 3p^2

And we want to calulate roots and the derivate of this polynomial.

I try with ToString[polynomial[{1,0,0,0,1,0,1}]] in order to use
convert the polynomial expression to string first and later use

ToExpression[]

and calculate roots

D[ToExpression[ToString[polynomial[{1,0,0,0,1,0,1}]], x]

like the next examples:

D[ToExpression["x^2+2x"], x]

or

NSolve[ToExpression["x^2+2x==x"], x]


But ToString erase ^ symbol.

Somebody knows how to solve it?


Warm regards
-jm




  • Prev by Date: Re: Re: Adding markers on the surface of a Plot3D?
  • Next by Date: Re: Re: Adding markers on the surface of a Plot3D?
  • Previous by thread: Re: Show and 6.0
  • Next by thread: Re: Creation and evaluation of polynomials