# Singular

 Page 1 of 1 [ 2 posts ]
 Print view | E-mail friend Previous topic | Next topic
Author Message
 Post subject: [Q] how to solve and evalutate a polynomial?Posted: Thu Aug 11, 2005 5:32 pm
if i have a polynomial f (ex : poly f = x2 - 1 )

i want to have f(1) ( f(1) = (1)^2-1 = 0 )
and want to solve f(x) = 0

How can i do this?

email: marine917i@gmail.com
Posted in old Singular Forum on: 2004-10-11 19:23:40+02

Top

 Post subject: Re: [Q] how to solve and evalutate a polynomial?Posted: Thu Aug 11, 2005 8:29 pm

Joined: Thu Aug 11, 2005 8:03 pm
Posts: 37
Location: RWTH Aachen, Germany
Hi,
Quote:
> if i have a polynomial f (ex : poly f = x2 - 1 )
>
> i want to have f(1) ( f(1) = (1)^2-1 = 0 )
> and want to solve f(x) = 0
>
> How can i do this?

First of all you have define a ring (which includes a definition of a ground field and an ordering on monomials).
In your case let the ground field be Q, then your ring definition will be
Code:
ring r = 0,(x),dp;

Code:
poly f = x^2 -1;

For evaluation there is a command "subst"
Code:
poly f1 = subst(f,x,1);

For "solving" you can use either factorization (for one polynomial)
Code:
factorize(f);

or, for systems of equations, see the library "solve.lib".

In any case, you find the detailed information in the documentation, available both on-line (for instance, at http://www.singular.uni-kl.de/Manual/2-0-5/index.htm) and in every distribution you dowload.

Best regards,

_________________
Viktor Levandovskyy

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

 You can post new topics in this forumYou can reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

 It is currently Thu Nov 15, 2018 11:22 am