I have this following function:
$$y\ =\ \sqrt{\left|x\right|^{2}}-\cos\left(3x\right)$$
which represents this:
And I need to find the intersection between an straight line created from two coordinates ($ab$ and $cd$) and this formula, something like this:
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$.


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.