Is there an equation that, given the two points of a line segment, will result, when graphed for x on a real graph, in a line segment?
Is there an equation that will graph a line segment?
27.3k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 3 best solutions below
On
Thinking in another way from the answer from Steven Fontaine, you can use any function that is only defined for some $x\in\Bbb R$ but not other $x$'s.
For example, since $\arcsin x$ is only defined for $[-1,1]$, you can write
$$y = mx + c + \arcsin x - \arcsin x$$
to "capture" the piece of straight line between $[-1,1]$. By adjusting the domain of $\arcsin (m'x+c')$ using $m'$ and $c'$, you can then "capture" any non-vertical finite segment.
Similarly, you may use $\sqrt{x}$ or $\ln{x}$ to graph a ray, the former includes the starting point and the latter does not.
On
I made a pretty simple and straightforward equation that can be used to limit any function:
For example: https://i.stack.imgur.com/pqgOx.png
here sqrt(2) is the lower bound of the function f(x)=x²+4 and 2 is the upper bound.
Keep in mind that sqrt(2) and 2 are not in the domain of f(x)
If you do want them in the domain of your function you can simply do: https://i.stack.imgur.com/X42S4.png
Around a year or so ago I came up with an equation that, when graphed on a real graph, graphs a line segment. It does so by making the numbers which are not a part of the segment imaginary, thus unable to be graphed on a real graph. The equation is as follows: $$y=\frac{(B-D)\left(\sqrt{x-A}\sqrt{|x-A|}-\sqrt{C-x}\sqrt{|C-x|}-x\right)+AB-CD}{A-C}$$ where (A,B) is the left-most point and (C,D) is the right-most point (that is, where $C > A$.) $$y \in \begin{cases} \ \mathbb{R} & \iff A \le x \le C,\\ \ \mathbb{I} & \text{otherwise} \end{cases}$$ So, in English, $y$ will be real if and only if $x$ is between $A$ and $C$; otherwise, it will be imaginary. Say for example I wanted to graph a segment from (-4,3) to (5,6). In that case, the equation becomes $$y=\frac{(3-6)\left(\sqrt{x+4}\sqrt{|x+4|}-\sqrt{5-x}\sqrt{|5-x|}-x\right)-(-4\bullet3)-(5\bullet6)}{-4-6}$$ which results in the following: $$\text{when}\; x=-5,\; y=3+\frac{1}{3}i;\; x=-4,\; y=3;\; x=5,\; y=6;\; x=6,\; y=6-\frac{1}{3}i$$ I have no clue for what, if anything, this could be used. I just thought I would share it since it was doing me no good. Anyway, thank you in advance for any positive feedback or constructive criticism.