# Polynomials in python

In the following code in the function root(x) I am trying to return a polynomial but I am running into an error. Is there a way to use higher degree polynomial with coefficients?

```
import math
import numpy as np
def root(x):
return(x**4+6x**2 -3)
def bisection_method(f, a, b, tol):
if f(a)*f(b) > 0:
#end function, no root.
print("No root found.")
else:
iter = 0
while (b - a)/2.0 > tol:
midpoint = (a + b)/2.0
if f(a)*f(midpoint) < 0: # Increasing but below 0 case
b = midpoint
else:
a = midpoint
iter += 1
return(midpoint, iter)
answer, iterations = bisection_method(root, 1, 3.1, 10**(-14))
print("Answer:", answer, "\nfound in", iterations, "iterations")
```

Resulting in the following error,

```
File "<ipython-input-22-a6a172c0ac5a>", line 4
return(x**4+6x**2 -3)
^
SyntaxError: invalid syntax
```

### 1 Answer

## Have an answer?

JD

you need another

`*`

after`6`