How to find the intersection of an straight line and a function?

713 Views Asked by At

I have this following function:

$$y\ =\ \sqrt{\left|x\right|^{2}}-\cos\left(3x\right)$$

which represents this:

enter image description here

And I need to find the intersection between an straight line created from two coordinates ($ab$ and $cd$) and this formula, something like this:

enter image description here

I only need the first intersection point coordinates ($ef$) (the closest).

On the internet I only find how to intersect circles with other straight lines. How do I do with a function?

I only have $ab$ and $cd$ coords and need to find $ef$.

1

There are 1 best solutions below

2
On BEST ANSWER

You may use point-slope form of line to find the equation of the line. $${{y-y_1}\over x-x_1} = m$$ $${{y-b}\over x-a} = {{b-d}\over {a-c}}$$ Your equation is $y=|x|-cos(3x)$

Substitute y in the equation of the line and solve for x. This will give you the value of e. With e, you can easily find the value of f.