Are there anyone help me how to write this polynomial into python language please, I’ve tried my best, but it’s too hard
P/s sorry for my bad grammar, i’m from vietnam
Asked
Active
Viewed 62 times
-2

stuckoverflow
- 625
- 2
- 7
- 23

Khoi Le
- 39
- 1
- 4
-
related https://stackoverflow.com/a/48228113/10934636 – stuckoverflow Jan 30 '21 at 15:43
1 Answers
0
Assuming you simply want to be able to get y result for either one of those equations, you can just do the following:
import math
def y1(x):
return 4*(x*x + 10*x*math.sqrt(x)+3*x+1)
def y2(x):
return (math.sin(math.pi*x*x)+math.sqrt(x*x+1))/(exp(2*x)+math.cos(math.pi/4*x))
If you want to evaluate y1 or y2 given a certain x, just use y1(x), for example:
print(y1(10))
print(y2(10))
If you want to be able to plot those equations in python, try using the python turtle module to do so.

Java Machine
- 83
- 1
- 7
-
Alternatively you could use matplotlib to plot said equations, which in my opinion, is easier than Turtle – A random coder Jan 30 '21 at 18:41