I created a formula that I hope creates a finite straight line between any two points, I wanted to know if my math logic is correct or if I have an error in my formula. The idea is to create a straight line at y=1 between two points and then use that intersection to multiply by any other formula to get the part of the formula that fits within the bounds of my defined limit.
Here is the formula that I created: $$\ln\left(\sqrt{9-x^2}*2\right)-\ln\left(\exp\left(\frac{\ln\left(\left(9-x^2\right)^2\right)}{4}\right)*2\right)+1$$
please note that the 9 can be any number and the square root of that number will be the endpoints of the line, so in the example above I am hoping to get a line between -3 and 3 exclusive.
Can you please tell me if my logic is correct and if this will always return just a positive line at y=1 between two defined endpoints. if not can you please tell me where the issue is.
Thank you for your help!
Thank you all for your feedback. just to clarify why I am doing this, I would like to, using a standard math formula get any section of another formula without the need to to use absolute value, or other math functions like MOD. I would like to be able to create a standard math function that I can insert into any other formula and get a subsection of the formula using standard math.
Thank you and sorry if it is confusing or if I am making things more complicated than they have to be.
My idea is only the first part will be invalid if $9-x^2$ is negative, and the rest of the logic will always be the exact same value without the value returning square root of a negative number so that it does not cancel out. and finally add a one so that if x is within the limit then the value is always 1 to later be able to multiply by any other formula.
My apologies again if I am making things way too complicated for my self.
I now understand what the feedback meant about it being too complicated. her is what I think the formula should be; $$\ln\left(\sqrt{9-x^2}\right)-\frac{\ln\left(\left(9-x^2\right)^2\right)}{4}+1$$
I believe this will be simpler and since $\ln\left(\sqrt{9-x^2}\right)$ does not allow x > 3 but $\frac{\ln\left(\left(9-x^2\right)^2\right)}{4}$ does allow x > 3 then this simpler function can be used to get any slice of a graph.
Please let me know if this is not correct.
Thank you, all again.
e^{...}. But why so complicated? – Andrei Dec 22 '20 at 17:47