Results 1 to 7 of 7
Like Tree2Thanks
  • 1 Post By Plato
  • 1 Post By Walagaster

Thread: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

  1. #1
    Newbie
    Joined
    Aug 2018
    From
    Vancouver, WA
    Posts
    2

    Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    So I'm trying to solve for an equation that produces a line that intersects two specific points and is shaped approximately like this:
    Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)-graph.png
    This equation is expressed as y = x / (|x| + 1), has asymptotes at y = 1 and y = -1, and intersects the points (0, 0) and (1, 0.5). I'm wondering how to modify this equation to have asymptotes at y = 0 and y = 0.95 and intersects the points (0, 0.05) and (1, 0.75).

    I'd really prefer a step-by-step solution in case I need to find similar equations with different parameters. Please and thank you everyone. Really need this for a project I'm working on.

    Jinumon
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    21,966
    Thanks
    2921
    Awards
    1

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Quote Originally Posted by Jinumon View Post
    So I'm trying to solve for an equation that produces a line that intersects two specific points and is shaped approximately like this:
    Click image for larger version. 

Name:	Graph.png 
Views:	1 
Size:	3.7 KB 
ID:	38904
    This equation is expressed as y = x / (|x| + 1), has asymptotes at y = 1 and y = -1, and intersects the points (0, 0) and (1, 0.5). I'm wondering how to modify this equation to have asymptotes at y = 0 and y = 0.95 and intersects the points (0, 0.05) and (1, 0.75).
    Is this the graph you want?
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member Walagaster's Avatar
    Joined
    Apr 2018
    From
    Tempe, AZ
    Posts
    96
    Thanks
    43

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Quote Originally Posted by Jinumon View Post
    So I'm trying to solve for an equation that produces a line that intersects two specific points and is shaped approximately like this:
    Click image for larger version. 

Name:	Graph.png 
Views:	1 
Size:	3.7 KB 
ID:	38904
    This equation is expressed as y = x / (|x| + 1), has asymptotes at y = 1 and y = -1, and intersects the points (0, 0) and (1, 0.5). I'm wondering how to modify this equation to have asymptotes at y = 0 and y = 0.95 and intersects the points (0, 0.05) and (1, 0.75).

    I'd really prefer a step-by-step solution in case I need to find similar equations with different parameters. Please and thank you everyone. Really need this for a project I'm working on.

    Jinumon
    I will show you how to do this and you can modify it for other cases. Your function goes from -1 to 1 which is 2 units. Let's multiply it by $\frac 1 2$ so it goes from $-\frac 1 2$ to $\frac 1 2$ and move it up $\frac 1 2$. So now it looks like$$
    f(x) = \frac 1 2\frac {x}{|x|+1}+\frac 1 2$$This will have asymptotes $y=0$ and $y=1$ You want the upper asymptote to be $.95$ so let's multiply it by $.95$. So now$$
    f(x) = .95\left (\frac 1 2\frac {x}{|x|+1}+\frac 1 2 \right)$$
    So far this graph has the right shape and desired asymptotes. Now this function takes the value $.05$ way to the left of $x=0$. If you set $f(x) = .05$ and solve it you get $x = -8.5$. So $f(-8.5)=.05$ but you want $f(0) = .05$. So now replace $x$ by $x - 8.5$ in your equation. Now your equation is$$
    f(x)= .95\left (\frac 1 2\frac {x-8.5}{|x-8.5|+1}+\frac 1 2 \right)$$
    Translating it horizontally didn't change the horizontal asymptotes and now $f(0) = .05$ All that is left is to get $f(1)=.75$. Currently the value of $x$ that gives $f(x) = .75$ is $x=9.875$. So if you scale the $x$ axis by replacing $x$ by $9.875x$, that should do it. Your final formula becomes$$
    f(x)=.95\left (\frac 1 2\frac {9.875x-8.5}{|9.875x-8.5|+1}+\frac 1 2 \right)$$

    Here's a graph of the final result (click to enlarge):
    Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)-graph.jpg
    Thanks from topsquark
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Aug 2006
    Posts
    21,966
    Thanks
    2921
    Awards
    1

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Quote Originally Posted by Walagaster View Post
    I will show you how to do this and you can modify it for other cases. Your function goes from -1 to 1 which is 2 units. Let's multiply it by $\frac 1 2$ so it goes from $-\frac 1 2$ to $\frac 1 2$ and move it up $\frac 1 2$. So now it looks like$$
    f(x) = \frac 1 2\frac {x}{|x|+1}+\frac 1 2$$This will have asymptotes $y=0$ and $y=1$ You want the upper asymptote to be $.95$ so let's multiply it by $.95$. So now$$
    f(x) = .95\left (\frac 1 2\frac {x}{|x|+1}+\frac 1 2 \right)$$
    So far this graph has the right shape and desired asymptotes. Now this function takes the value $.05$ way to the left of $x=0$. If you set $f(x) = .05$ and solve it you get $x = -8.5$. So $f(-8.5)=.05$ but you want $f(0) = .05$. So now replace $x$ by $x - 8.5$ in your equation. Now your equation is$$
    f(x)= .95\left (\frac 1 2\frac {x-8.5}{|x-8.5|+1}+\frac 1 2 \right)$$
    Translating it horizontally didn't change the horizontal asymptotes and now $f(0) = .05$ All that is left is to get $f(1)=.75$. Currently the value of $x$ that gives $f(x) = .75$ is $x=9.875$. So if you scale the $x$ axis by replacing $x$ by $9.875x$, that should do it. Your final formula becomes$$
    f(x)=.95\left (\frac 1 2\frac {9.875x-8.5}{|9.875x-8.5|+1}+\frac 1 2 \right)$$
    Here's a graph of the final result (click to enlarge):
    Click image for larger version. 

Name:	graph.jpg 
Views:	6 
Size:	10.4 KB 
ID:	38905
    -Now who is giving complete solutions?
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member Walagaster's Avatar
    Joined
    Apr 2018
    From
    Tempe, AZ
    Posts
    96
    Thanks
    43

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Yeah, I figured I might hear about that. But it sounded like it wasn't a homework problem because he said it was part of a project where he might need to do more cases.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Aug 2018
    From
    Vancouver, WA
    Posts
    2

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Thank you so much Walagaster. I'm working on an RPG and wanted a to-hit rate where x = Atk Rating / Def Rating that approaches 95% and 5% and where Hit Rate is 75% when the two are equal. So yeah, not homework. Depending on how it playtests I may need to adjust values but I really wanted something with asymptotes so hitting or missing was never totally assured. Thanks again,
    Jinumon
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member Walagaster's Avatar
    Joined
    Apr 2018
    From
    Tempe, AZ
    Posts
    96
    Thanks
    43

    Re: Need Equation for Line Intersecting Two Points Involving y = x/(|x|+1)

    Quote Originally Posted by Jinumon View Post
    Thank you so much Walagaster. I'm working on an RPG and wanted a to-hit rate where x = Atk Rating / Def Rating that approaches 95% and 5% and where Hit Rate is 75% when the two are equal. So yeah, not homework. Depending on how it playtests I may need to adjust values but I really wanted something with asymptotes so hitting or missing was never totally assured. Thanks again,
    Jinumon
    You're welcome. There are other common curves that you might want to look at that have the same general shape. One is $y=\arctan x$ and another is the logistics curve $$y = \frac 1 {1+e^{-x}}$$
    You could try similar modifications on those to see what suits your purposes best.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: Jan 2nd 2014, 06:38 AM
  2. Replies: 5
    Last Post: Apr 15th 2011, 11:54 PM
  3. Equation of a line (two points)
    Posted in the Geometry Forum
    Replies: 6
    Last Post: Jun 26th 2008, 11:27 PM
  4. Circle problem involving intersecting line.
    Posted in the Math Topics Forum
    Replies: 3
    Last Post: Apr 6th 2008, 05:38 AM
  5. Line equation from two points
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: Jul 12th 2007, 06:07 AM

/mathhelpforum @mathhelpforum