Je dois évaluer ce polynôme -X^2 + 2X + 5 quand X = -1. J'ai essayé mais je suis perdu avec les signes. Est-ce que quelqu'un peut m'expliquer comment faire cette opération pas à pas ?
Polynomial evaluation

Let K be a field or, more generally, a commutative ring, and R a ring containing K. For any polynomial P in K and any element a in R, the substitution of X with a in P defines an element of R, which is denoted P (a). This element is obtained by carrying on in R after the substitution the operations indicated by the expression of the polynomial. This computation is called the evaluation of P at a. For example, if we have

we have

(in the first example R = K, and in the second one R = K). Substituting X for itself results in

explaining why the sentences "Let P be a polynomial" and "Let P (X) be a polynomial" are equivalent.

The polynomial function defined by a polynomial P is the function from K into K that is defined by x ↦ P (x). {\displaystyle x\mapsto P(x).} If K is an infinite field, two different polynomials define different polynomial functions, but this property is false for finite fields. For example, if K is a field with q elements, then the polynomials 0 and X − X both define the zero function.

For every a in R, the evaluation at a, that is, the map P ↦ P (a) {\displaystyle P\mapsto P(a)} defines an algebra homomorphism from K to R, which is the unique homomorphism from K to R that fixes K, and maps X to a. In other words, K has the following universal property:

As for all universal properties, this defines the pair (K, X) up to a unique isomorphism, and can therefore be taken as a definition of K.

The image of the map P ↦ P (a) {\displaystyle P\mapsto P(a)}, that is, the subset of R obtained by substituting a for X in elements of K, is denoted K. For example, Z = { P (2) ∣ P (X) ∈ Z } {\displaystyle \mathbb {Z} =\{P({\sqrt {2}})\mid P(X)\in \mathbb {Z} \}}, and the simplification rules for the powers of a square root imply Z = { a + b 2 ∣ a ∈ Z, b ∈ Z }. {\displaystyle \mathbb {Z} =\{a+b{\sqrt {2}}\mid a\in \mathbb {Z},b\in \mathbb {Z} \}.}
Addition et soustraction

Les polynômes peuvent être additionnés en utilisant la loi associative de l'addition (en regroupant tous leurs termes dans une seule somme), éventuellement suivie d'un réarrangement (en utilisant la loi commutative) et de la combinaison des termes semblables. Par exemple, si P = 3 x² − 2 x + 5 xy − 2 et Q = − 3 x² + 3 x + 4 y² + 8, alors la somme P + Q = 3 x² − 2 x + 5 xy − 2 − 3 x² + 3 x + 4 y² + 8 peut être réordonnée et regroupée comme P + Q = (3 x² − 3 x²) + (− 2 x + 3 x) + 5 xy + 4 y² + (8 − 2) et ensuite simplifiée en P + Q = x + 5 xy + 4 y² + 6. Lorsque des polynômes sont additionnés, le résultat est un autre polynôme.

La soustraction de polynômes est similaire.
### Query ###
Je dois évaluer ce polynôme -X^2 + 2X + 5 quand X = -1. J'ai essayé mais je suis perdu avec les signes. Est-ce que quelqu'un peut m'expliquer comment faire cette opération pas à pas ?

### Main Text ###
Polynomial evaluation

Let K be a field or, more generally, a commutative ring, and R a ring containing K. For any polynomial P in K and any element a in R, the substitution of X with a in P defines an element of R, which is denoted P (a). This element is obtained by carrying on in R after the substitution the operations indicated by the expression of the polynomial. This computation is called the evaluation of P at a. For example, if we have

we have

(in the first example R = K, and in the second one R = K). Substituting X for itself results in

explaining why the sentences "Let P be a polynomial" and "Let P (X) be a polynomial" are equivalent.

The polynomial function defined by a polynomial P is the function from K into K that is defined by x ↦ P (x). {\displaystyle x\mapsto P(x).} If K is an infinite field, two different polynomials define different polynomial functions, but this property is false for finite fields. For example, if K is a field with q elements, then the polynomials 0 and X − X both define the zero function.

For every a in R, the evaluation at a, that is, the map P ↦ P (a) {\displaystyle P\mapsto P(a)} defines an algebra homomorphism from K to R, which is the unique homomorphism from K to R that fixes K, and maps X to a. In other words, K has the following universal property:

As for all universal properties, this defines the pair (K, X) up to a unique isomorphism, and can therefore be taken as a definition of K.

The image of the map P ↦ P (a) {\displaystyle P\mapsto P(a)}, that is, the subset of R obtained by substituting a for X in elements of K, is denoted K. For example, Z = { P (2) ∣ P (X) ∈ Z } {\displaystyle \mathbb {Z} =\{P({\sqrt {2}})\mid P(X)\in \mathbb {Z} \}}, and the simplification rules for the powers of a square root imply Z = { a + b 2 ∣ a ∈ Z, b ∈ Z }. {\displaystyle \mathbb {Z} =\{a+b{\sqrt {2}}\mid a\in \mathbb {Z},b\in \mathbb {Z} \}.}

### Supplementary Text ###
Addition et soustraction

Les polynômes peuvent être additionnés en utilisant la loi associative de l'addition (en regroupant tous leurs termes dans une seule somme), éventuellement suivie d'un réarrangement (en utilisant la loi commutative) et de la combinaison des termes semblables. Par exemple, si P = 3 x² − 2 x + 5 xy − 2 et Q = − 3 x² + 3 x + 4 y² + 8, alors la somme P + Q = 3 x² − 2 x + 5 xy − 2 − 3 x² + 3 x + 4 y² + 8 peut être réordonnée et regroupée comme P + Q = (3 x² − 3 x²) + (− 2 x + 3 x) + 5 xy + 4 y² + (8 − 2) et ensuite simplifiée en P + Q = x + 5 xy + 4 y² + 6. Lorsque des polynômes sont additionnés, le résultat est un autre polynôme.

La soustraction de polynômes est similaire.

### Draft ###

Query: "-X² + 2X + 5 quand X = -1" → evaluate polynomial at x=-1.

User confusion: "perdu avec les signes" = lost with signs. Basic arithmetic error, not conceptual gap.

### 1. Direct Evaluation

Given: f(x) = -x² + 2x + 5
Evaluate at x = -1:
f(-1) = -(-1)² + 2(-1) + 5
→ f(-1) = -(1) - 2 + 5
→ f(-1) = -1 - 2 + 5
→ f(-1) = -3 + 5
→ f(-1) = 2

∴ Result: 2

### 2. Step-by-Step Breakdown

**Step 1**: Substitute x = -1
f(-1) = -(-1)² + 2(-1) + 5

**Step 2**: Simplify exponents first
(-1)² = 1
→ f(-1) = -(1) + 2(-1) + 5

**Step 3**: Simplify multiplications  
2(-1) = -2
→ f(-1) = -1 - 2 + 5

**Step 4**: Simplify additions/subtractions
From left to right:
-1 - 2 = -3
-3 + 5 = 2

**Final result**: f(-1) = 2

### 3. Common Error Analysis

User likely confused by:
- Double negative (-(-1)²) → positive result
- Order of operations: exponents before multiplication
- Sign propagation: -2(-1) = +2 (not -2)

**Key insight**: Evaluate innermost operations first. Follow PEMDAS/BODMAS.

### 4. Verification

Physical constraint check: Quadratic polynomials typically have multiple real roots. f(x) = -x² + 2x + 5 has one real root near x ≈ 2.83. At x = -1, should be positive (verify graph).

Arithmetic verification:
- Substitute correctly: ✓
- Exponent calculation: ✓  
- Multiplication signs: ✓
- Order of operations: ✓

**Conclusion**: Step-by-step evaluation requires careful sign tracking and proper order of operations. User's confusion stems from basic arithmetic errors rather than polynomial concept understanding.

### Answer###
Pour évaluer le polynôme -X² + 2X + 5 quand X = -1, vous devez substituer -1 à chaque occurrence de X dans le polynôme.

Voici les étapes détaillées :

1. Remplacez X par -1 : (-1)² + 2(-1) + 5

2. Calculez les exposants : (-1)² = 1 → 1 + 2(-1) + 5

3. Multipliez : 2(-1) = -2 → 1 - 2 + 5

4. Additionnez et soustraisez : 1 - 2 = -1, puis -1 + 5 = 4

Donc, lorsque X = -1, le polynôme vaut 4.

L'évaluation de polynômes suit toujours le même principe : vous remplacez la variable par la valeur donnée et effectuez les opérations arithmétiques selon l'ordre correct des opérations.