Results 1 to 4 of 4

Math Help - Fitting a sine wave between two lines

  1. #1
    Newbie
    Joined
    Jan 2013
    From
    United Kingdom
    Posts
    2

    Fitting a sine wave between two lines

    I have a data set that appears to be made up of two linear regions, separated by what best looks like a sine wave.



    I know the x and y co-ordinates of the two points at the end of each line segment, x1, x2, y1, y2, and the respective gradient of the lines, m1 and m2.

    I believe I can parameterise a sine wave of the form "y = Asin(Bx+C)+D" so that it passes through the given points, with the same gradient, but can't work out how to solve for the parameters.

    Does anybody have any ideas?
    Thanks!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Aug 2011
    Posts
    249
    Thanks
    60

    Re: Fitting a sine wave between two lines

    Hi !
    The shape of the curve looks like an hyperbola (non orthogonal).
    I suggest to fit the curve (least squares fitting method, involving 5 parameters) to the general quadratic equation and then, compute the characteristic parameters of the hyperbola.
    It might be much simpler if you already know the gradient of the asymtotes m1 and m2 . In this case, the equation of the hyperbola is :
    (y-m1*x+C1)*(y-m2*x+C2)+C3=0
    C1, C2 and C3 can be computed thanks to a linear regression involving 3 parameters (to be defined in relation with C1, C2, C3).
    Last edited by JJacquelin; January 28th 2013 at 09:20 AM.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2013
    From
    United Kingdom
    Posts
    2

    Re: Fitting a sine wave between two lines

    Hi,

    This works, thanks for the reply!

    If anyone has any ideas, I'd still be interested to know whether it's possible to fit a sine wave under these conditions as a matter of interest.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Aug 2011
    Posts
    249
    Thanks
    60

    Re: Fitting a sine wave between two lines

    Quote Originally Posted by charlieahill View Post
    If anyone has any ideas, I'd still be interested to know whether it's possible to fit a sine wave under these conditions as a matter of interest.
    Fitting a sine function y = Asin(Bx+C)+D to experimental data is a difficult problem. Of course only the points on the area of the sine wave have to be considered and the other points excluded. Since they are 4 parameters A, B, C, D to be optimized, the number of experimental points must be large enough.
    A method is discribed in the paper "Régressions et équations intégrales" : JJacquelin's Documents | Scribd
    (in French. No translation available today) which includes a chapter "Régression sinusoidale" : theory and application pp.21-34 and usable equations pp.35-36
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. sine wave amplitude calculation
    Posted in the Advanced Math Topics Forum
    Replies: 7
    Last Post: April 30th 2012, 03:29 PM
  2. Points on a sine wave
    Posted in the Geometry Forum
    Replies: 1
    Last Post: April 22nd 2011, 11:19 AM
  3. General Sine Wave
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: November 25th 2010, 06:28 PM
  4. square sine wave
    Posted in the Trigonometry Forum
    Replies: 3
    Last Post: September 30th 2009, 05:04 AM
  5. Replies: 2
    Last Post: November 6th 2007, 01:05 PM

Search Tags


/mathhelpforum @mathhelpforum