1 | initial version |
Use plot(y, (x, 5, 20))
— use y
instead of y(x)
. When you pass y(x)
as an argument, where y
is a Python function, it gets evaluated right away: it doesn't plug in different values for x
, it just tries to evaluate y(x)
as a number. That's where the error messages come from. If you plug in y
instead, it tests to see if it is a function and if so, it plugs in x
-values in the given range.