Derivation

As part of the project I am working at, I wrote the code to differentiate a mathematical expression. Here’s some early output:

D:\_development\C\c-programs\console\parser>derive.exe "(5*x^2+pi*ln(x))/sin(sqrt(x+y))"

function:
    2
 5·x  + ¶·ln(x)
────────────────
      /┌─────\
   sin\Vx + y/

partial derivative (x):
 /     2 - 1        1   \    /┌─────\   /   2          \    /┌─────\      1
 │5·2·x     ·1 + ¶·───·1│·sin\Vx + y/ - \5·x  + ¶·ln(x)/·cos\Vx + y/·──────────·(1 + 0)
 \                  x   /                                               ┌─────
                                                                      2·Vx + y
────────────────────────────────────────────────────────────────────────────────────────
                                         2/┌─────\
                                      sin \Vx + y/

partial derivative (y):
 /     2 - 1        1   \    /┌─────\   /   2          \    /┌─────\      1
 │5·2·x     ·0 + ¶·───·0│·sin\Vx + y/ - \5·x  + ¶·ln(x)/·cos\Vx + y/·──────────·(0 + 1)
 \                  x   /                                               ┌─────
                                                                      2·Vx + y
────────────────────────────────────────────────────────────────────────────────────────
                                         2/┌─────\
                                      sin \Vx + y/

I have yet to double check all derivation rules and add a few transformations, but I am getting there 🙂
Of course I know Maxima can do this sort of things quite well and even more 😉

This entry was posted in Maths. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s