Results 1 to 4 of 4

Math Help - Numerical solution w/o derivative

  1. #1
    Junior Member
    Joined
    Sep 2006
    Posts
    44

    Post Numerical solution w/o derivative

    I know the function y = f(x).

    I have observed the true y-value and want to find the x that it implies.

    It is impossible to invert the function, i.e. to analytically solve for x=g(y).

    The derivative of the function is unavailable, so I cannot use the Newton-Raphson method.

    It isn't difficult to come up with a way of trial and error which work. But I want to check with you if there is some intelligent way to deal with such iterations in order to make the procedure reasonably efficient?


    While it is possible to formulate the derivative of y=f(x), it is impractical to use it because it is a formula which fills an entire page! (According to Mathematica) I need to implement a way to solve this problem in c++.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    You can use the bisection method it does not require derivatives and works fast.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Sep 2006
    Posts
    44

    Thumbs up

    Thanks! That's a pretty intuitive solution.

    Of course, the catch is that one has to find one point on each side of the solution before one can proceed like that.

    I have now looked at the derivative (which is too extensive to use in the real time code where I need to solve this problem). I see that the derivative of the function obviously is negative but increasing in the interval of interest, under all reasonably expected parameter values.

    Based on this, I'm thinking about using linear extrapolation like this:

    If the two first guesses x=a and x=b both yield too high y-values, then I would consider a straight line through those two points a and b and choose the third guess x=c on that same line. I would choose x=c so that it would be right on target if y(x) was a straight line from y(a) to y(c). Because the derivative of y(x) is increasing and negative, then I suppose that y(c) must give a solution which is too low. From there on I would be able to use the bisection method with b and c.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member
    Joined
    Sep 2006
    Posts
    44
    No, my thinking above was wrong. I cannot choose an x-value which surely gives me a y-value "on the other side" of the observed y-value. Not by only knowing that the first derivative is negative and the second derivative is positive.

    I must use more specific expectations about the slope of y=f(x) in order to do that.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Numerical solution of a (system of?) DE
    Posted in the Advanced Math Topics Forum
    Replies: 3
    Last Post: May 27th 2010, 02:15 PM
  2. Numerical solution in mathematica
    Posted in the Math Software Forum
    Replies: 0
    Last Post: May 12th 2010, 10:22 AM
  3. Numerical solution of a first order ODE
    Posted in the Differential Equations Forum
    Replies: 1
    Last Post: May 1st 2010, 08:52 AM
  4. Help with numerical solution of PDE
    Posted in the Differential Equations Forum
    Replies: 3
    Last Post: March 20th 2010, 01:37 PM
  5. numerical solution
    Posted in the Calculus Forum
    Replies: 3
    Last Post: May 7th 2008, 04:30 AM

Search Tags


/mathhelpforum @mathhelpforum