0
$\begingroup$

I need a function that does the following:

  • x can not be greater than 1
  • y can not be greater then 2
  • As x approaches the value 0, then y approaches, but does not reach the value 2.
  • As y approaches the 0, then x appproaches, but does not reach the value 1.

The graph of the function should look something like the following image, except for the part where the x value exceeds the value of 1. I need x to only approach the value of 1.

This is kinda what I'm looking for

  • 0
    Does the function have to qualify as a nonlinear function also, or will a linear function do? There exist an uncountable infinity of nonlinear functions which satisfy your conditions.2011-09-14
  • 0
    "As x approaches the value 0, then y approaches, but does not reach the value 2." This is ambiguous. What about $y=2*(x-1)^2$? When $x$ "approaches" (but does not reach) 0, $y$ approaches (but does not reach) 1. Or perhaps you meant "when $x$ tends to 0, $y$ tends to some $y_0<1$2011-09-14

1 Answers 1

1

Why do you tag this conic sections? Does $y=2(1-x^p)$ , where $0 \lt p \lt 1$ and the smaller $p$ gets, the closer the bend is to the origin meet your needs? As Arturo Magidin suggests, you should state $x \in (0,1)$

Added: if you really want a conic section, you could use $y=\frac{2}{1-x}$ restricted to $(0,1).$ If that doesn't go deep enough into the corner, $y=\frac{2}{(1-x)^p}$, again with $0 \lt p \lt 1,$ is available, but is no longer a conic section.

  • 0
    Of course, you want to restrict the domain explicitly; or throw in some "dummy factor" that makes the function undefined for $x\geq 1$ and for $x\leq 0$; perhaps $\frac{\sqrt{x(1-x)}}{\sqrt{x(1-x)}}$?2011-09-14
  • 0
    @Arturo: that factor cancels very nicely, no? Probably you intended something like $\sqrt{\mathrm{sign}(x(1-x))}$...2011-09-14
  • 0
    @J. M., if you pretend you don't know about imaginary numbers, then Arturo's factor cannot cancel outside $[0,1]$, because neither numerator nor denominator even exist.2011-09-14
  • 0
    @Henning: True, but if this one's going to be for programming purposes, I've seen compilers aggressively optimize out anything of the form `x-x` and `x/x` in expressions...2011-09-14
  • 0
    which is why one should always turn on the "strict floating-point" option in one's compiler.2011-09-14
  • 0
    @J.M.: No, I meant it to cancel; putting the factor in and using the usual rules about natural domain of functions excludes every point not on $(0,1)$, while leaving the value of $2(1-x^p)$ the same inside. Just like $\frac{x}{x}$ is not equal to the function $1$, because the former is not defined at $0$ while the latter is.2011-09-14