Results 1 to 2 of 2

Math Help - MATLAB

  1. #1
    Junior Member
    Joined
    Aug 2008
    Posts
    44

    MATLAB

    The functions

    f(x)= (sqrt(x^2+1) - 1) /x^2 and g(x) = 1/ (sqrt(x^2+1) +1)

    1)Using MATLAB compute the limit as x approaches to 0 by looking at the values x=1/2^i for i=1:30

    2) What happens if you set r=sqrt(ulp) and evaluate f(r) and g(r)?

    anything would help.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by Juancd08 View Post
    The functions

    f(x)= (sqrt(x^2+1) - 1) /x^2 and g(x) = 1/ (sqrt(x^2+1) +1)

    1)Using MATLAB compute the limit as x approaches to 0 by looking at the values x=1/2^i for i=1:30

    2) What happens if you set r=sqrt(ulp) and evaluate f(r) and g(r)?

    anything would help.
    First it would help if you created function for the functions.

    something like:

    Code:
    function rv=ff(x)
      rv=(sqrt(x.^2+1)-1)./x.^2;
    and:

    Code:
    function rv=gg(x)
      r=1./ (sqrt(x.^2+1) +1);
    then:

    Code:
    i=1:30;
    x=2.^(-i);
     
    ff(x)
    gg(x)
    Will show the values at a sequence of points approaching zero.


    RonL
    Last edited by CaptainBlack; September 21st 2008 at 11:43 PM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Matlab help
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 11th 2010, 02:59 AM
  2. Matlab FFT Help
    Posted in the Math Software Forum
    Replies: 0
    Last Post: June 3rd 2009, 12:48 PM
  3. help about ODE in matlab
    Posted in the Math Software Forum
    Replies: 1
    Last Post: May 31st 2009, 03:10 AM
  4. Matlab Please help me
    Posted in the Math Software Forum
    Replies: 8
    Last Post: November 10th 2008, 04:40 PM
  5. Matlab
    Posted in the Calculus Forum
    Replies: 3
    Last Post: August 20th 2008, 10:39 PM

Search Tags


/mathhelpforum @mathhelpforum