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

    0
    ReputationRep:
    Hi, I have a question which asks me to evaluate  \displaystyle\int^\frac{\pi}{2} _0 \dfrac{1}{\sqrt(1-2Cos(x)^2)} dx

    Using Simpson's rule 40 times. (Using mathematica)

    I have a =  0 ; b = \frac{\Pi}{2}, n =  40 , h =  \frac{b-a}{2n}

    I have notices though, that I should have x[i] = a +ih for i = 0, ... , 2n

    But even for i = 0, I have:

    f[x[i]] =  \dfrac{1}{\sqrt(1-2Cos(0)^2)} = \dfrac{1}{\sqrt(1-2)} = -i

    I'm not sure where I'm going wrong.

    My mathematica seems to have decided that dividing by 0 is too much to handle, and has crashed

    Any help would be appreciated
    • Study Helper
    Offline

    13
    Study Helper
    (Original post by ekudamram)
    Any help would be appreciated
    Well 1-2\cos^2\theta\equiv -\cos2\theta and is going to be negative in the interval  [ 0,\pi/4).

    So, I don't see how you can apply Simpson's rule to this.

    Are you sure the function/limts are correct?
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by ghostwalker)
    Well 1-2\cos^2\theta\equiv -\cos2\theta and is going to be negative in the interval  [ 0,\pi/4).

    So, I don't see how you can apply Simpson's rule to this.

    Are you sure the function/limts are correct?
    Yeah, I've written down exactly what he gave in the question.

    The only thing I can think of is that he's written it down wrong, as if it was

     f(x) = \dfrac{1}{\sqrt(1+2Cos(x)^2)} dx

    Then this gives  \displaystyle\int^\frac{\pi}{2} _0 f(x) dx \approx 1.171420084
    • Study Helper
    Offline

    13
    Study Helper
    (Original post by ekudamram)
    Yeah, I've written down exactly what he gave in the question.

    The only thing I can think of is that he's written it down wrong, as if it was

     f(x) = \dfrac{1}{\sqrt(1+2Cos(x)^2)} dx

    Then this gives  \displaystyle\int^\frac{\pi}{2} _0 f(x) dx \approx 1.171420084
    I'd check back with the person who gave you the question, if that's possible.

    Failing that others on the course.

    Failing that go with what you think it should be - as per your previous post.
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by ghostwalker)
    I'd check back with the person who gave you the question, if that's possible.

    Failing that others on the course.

    Failing that go with what you think it should be - as per your previous post.
    Yeah, I have emailed him, but I'm not expecting any reply until at least tuesday, so I will ask someone on my course.
    Although the only person I really know is celebrating her anniversary with her boyfriend today, so I'll leave it for tonight.

    But yeah, I think it must be written down wrong, although I've spent all day today trying to work around it, so that's 8 hours wasted

    Thank you for helping though
 
 
 
  • 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
    What's your favourite Christmas sweets?
    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.