Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    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.
    Offline

    3
    ReputationRep:
    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.
 
 
 
  • 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
    Did TEF Bronze Award affect your UCAS choices?
    Useful resources

    Make your revision easier

    Maths

    Maths Forum posting guidelines

    Not sure where to post? Read the updated guidelines here

    Equations

    How to use LaTex

    Writing equations the easy way

    Student revising

    Study habits of A* students

    Top tips from students who have already aced their exams

    Study Planner

    Create your own Study Planner

    Never miss a deadline again

    Polling station sign

    Thinking about a maths degree?

    Chat with other maths applicants

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • 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

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