Thilina's Blog

I might be wrong, but…

Symbolic Integration and Differentiation using MATLAB


While messing with MATLAB during free time I have found the method (thanks to MATLAB documentation) of performing symbolic integration and differentiation using MATLAB. And also the proper way to display a function in MATLAB command line. In this small article I am going to share my experience on symbolic integration and differentiation using MATLAB.

Representing a function as reader friendly format

Take an example function f(x) as,

aa

We can input our function to MATLAB as follows.

image

You can clearly see that ‘x’ is a symbolic object and f(x) is a symbolic function. Say If you need to evaluate f(x) at x = 10; that is f(10) then it’s simply;

clip_image005

However this equation and answer representation is bit annoying. Therefore by using the command ‘pretty’ we can display this in more readable format in MATLAB command line.

clip_image006

Now let’s have a look how the symbolic differentiation is performed.

Continue reading

Advertisements

2013 December 15 Posted by | MATLAB | , , , , , , , | Leave a comment

   

%d bloggers like this: