I'm trying to solve a system of equations to find a point where a line originating from a known point intersects with a known function:
m*x_3 - y_3 = m*x_2 - y_2
Where it also holds that for the given function f:
y_3 = f(x_3)
It's certainly a system of two equations with two unknowns, and I think we can assume f is invertible (if needed), but I can't seem to figure a way to code as a simple Ax = b
or x = A\b
. Curious how I might try to approach this.
I've considered setting it up as:
g = @(x) m*x - f(x) - m*x_2 + y_2
and using an iterating zero solver such that g(x_3) = 0
but I'm trying to find a workaround to make it as efficient as possible.