Practical 7

Numerical Integration

Sometimes there is no explicit expression because the antiderivative can’t be written in terms of familiar functions. Instead MATLAB can use numerical techniques to find the definite integral by using the double command.

> Exercise: Limitations of Integration Techniques

> Create a symbolic equation  

> Use the int command to find the indefinite integral, and observe the output.

intf = int(f,v)

> Modify the above command to find the definite integral between v=0 and v=pi.

Does the command work?

> Observe what happens if you use the double command.

defint=double(int(f,v,0,pi))