Ask Your Question

A simple problem related to symbolic calculation

asked 2015-05-30 07:15:05 -0600

Nownuri1 gravatar image

updated 2015-05-30 07:40:17 -0600

rws gravatar image

Could anyone let me know how you can define a variable as some function of another variable without specific definition? For example, how can you define theta as some function of x and then differentiate the 'sin(theta)' by x?

The following is my code that doesn't work. I couldn't find how to fix it in reference manuals. Any help will be appreciated.

var('theta, y, f')

y=sin(theta) ; theta=f(x);


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-05-30 07:37:30 -0600

rws gravatar image

updated 2015-05-30 09:34:08 -0600

sage: theta = function('theta')(x)
sage: y = sin(theta)
sage: y.diff(x)

Dis the differential operator, see The online Sage docs are a bit behind the newest development version, so I cannot give you a link to Sage docs at the moment.

edit flag offensive delete link more


Thank you so much!

Nownuri1 gravatar imageNownuri1 ( 2015-05-30 07:49:58 -0600 )edit

But could you please tell me what the D[0] (theta) (x) means?

Nownuri1 gravatar imageNownuri1 ( 2015-05-30 07:56:55 -0600 )edit

I added to the answer. HTH.

rws gravatar imagerws ( 2015-05-30 09:34:46 -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

1 follower


Asked: 2015-05-30 07:15:05 -0600

Seen: 160 times

Last updated: May 30 '15