clear all
; Some symbolic differentiation examples follow.

; Take the derivative of the absolute value function:
|x|
derivative ; The result is the sign function sgn(x), which gives the sign of x.

; Take the derivative of an algebraic fraction:
y=(8x^5+28x^4+34x^3+41x^2+35x-14)/(12x^5+4x^4-27x^3-9x^2-84x-28)
fraction ; Simplify first, "simplify fraction" does a similar task.
derivative

; A Taylor series demonstration:
y=x_new^n
taylor x_new 1 x_old ; build the (nth root of y) iterative approximation formula
solve verify x_new ; solve for the output variable, verifying the result
simplify ; convergent nth root approximation formula:
copy
replace x_old x_new with x ; make x_old (input) and x_new (output) the same
x ; make sure the formula was correct by solving for x

; Another Taylor series demo:
e^x ; enter the exponential function
taylor x 10 0 ; generate a 10th order taylor series of the exponential function
laplace x ; do a Laplace transform on it
simplify ; show the structure of the result
laplace inverse x ; undo the Laplace transform
compare with 9 ; check the result
