Ask Your Question
1

TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'sage.symbolic.expression.Expression'

asked 2018-07-29 08:17:42 -0600

yasar11732 gravatar image

When I enter following command in Sage Notebook;

var('x k w')
f = x^3 * e^(k*x) * sin(w*x)
show(f)
show(f.diff(x))

I get this error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-e1add3252393> in <module>()
      1 var('x k w')
----> 2 f = x**Integer(3) * e**(k*x) * sin(w*x)
      3 show(f)
      4 show(f.diff(x))

TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'sage.symbolic.expression.Expression'

How can I resolve this issue.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2018-07-29 09:49:36 -0600

slelievre gravatar image

updated 2018-07-29 09:50:33 -0600

Did you define e = [0, 1, 2] earlier in the same session?

Try using exp(...) instead of e^(...).

f = x^3 * exp(k*x) * sin(w*x)
edit flag offensive delete link more

Comments

It appears that I had :)

yasar11732 gravatar imageyasar11732 ( 2018-07-29 16:21:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-07-29 08:17:42 -0600

Seen: 90 times

Last updated: Jul 29