Hello, I need your help
How can I plot a list of numbers? Because I don't want to plot point by point.
In my example I want to plot the x-values when k(x)=0
How can I plot a list of numbers? Because I don't want to plot point by point.
In my example I want to plot the x-values when k(x)=0
import sympy as sp import numpy as np import matplotlib.pyplot as plt sp.var('x',real=True) def k(x): return (x***4)-(3*x***3)+((7/4)*x**2)+((3/4)*x)-1 xx=np.linspace(-2,2,100) plt.figure() plt.plot(xx,k(xx)) plt.show() a= sp.solve(k(x));a plt.figure() plt.plot(xx,k(xx)) plt.plot(a,k(a),'+')#doesn't work plt.show() plt.figure() plt.plot(xx,k(xx)) plt.plot(a[0],k(a[0]),'+')#work but I want for all the terms also when there are 100 terms in a plt.show()'`The recived error message
Error:TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'int'
Thanks for all!