You are Here: Home >< Maths

# Matlab Watch

1. Hi everyone I have a question to do on matlab and I am finding it difficult to answer after trying various ways.

The question is:
Develop a MATLAB user defined function that determines the definite integral
of a polynomial. The function will be of the form function G =
polyintegral(v,x0,x1) where x0 and x1 are the lower and upper limits of
integration and v is a vector of the polynomial coefficients so that the
polynomial is given by

y=v1+v2x+v3x^2+...vn+1x^n

Test your function by determining the value of

integrate with limits 3 and -2: 2+6.7x+4x^2-3x^3+1.5x-x^6dx

HINT: You can easily inegrate x^n - it is equal to x^n+1/n+1. Then evaluate ot between limits.
2. Consider what you want to come out at the end of the integration.

I would suggest writing it out by hand first before you try implementing it in MATLAB.

TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Updated: December 1, 2010
Today on TSR

### Degrees to get rich!

... and the ones that won't

### Cambridge interviews pour in...

Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• Poll
Useful resources

### Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

### How to use LaTex

Writing equations the easy way

### Study habits of A* students

Top tips from students who have already aced their exams

## Groups associated with this forum:

View associated groups
Discussions on TSR

• Latest
• ## See more of what you like on The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

• The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.