-2

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

stuckoverflow
  • 625
  • 2
  • 7
  • 23
Khoi Le
  • 39
  • 1
  • 4

1 Answers1

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