Ask Your Question

# A simple problem related to symbolic calculation

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);

y.derivative(x)

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted
sage: theta = function('theta')(x)
sage: y = sin(theta)
sage: y.diff(x)
cos(theta(x))*D(theta)(x)


Dis the differential operator, see https://en.wikipedia.org/wiki/Differe.... 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.

more

## Comments

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

## Your Answer

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

Add Answer

## Stats

Asked: 2015-05-30 14:15:05 +0200

Seen: 165 times

Last updated: May 30 '15