Tangent through point touching function

Question
You have a point [math]P[/math] with coordinates [math](x_p,y_p)[/math] and a function [math]f(x)[/math]. [math]P[/math] does not lie on the graph of [math]f(x)[/math].[br]What is the equation of a tangent that touches [math]f(x)[/math] and goes through the point [math]P[/math]?
If you use the [code][/code][code]Tangent[/code] command with the point [math]P[/math] and the function [math]f[/math] as an argument, you only get a tangent to the function at a new point [math](x_p,f(x_p))[/math] that has the same [math]x-[/math]coordinate and lies on the graph of [math]f[/math]. This is not what we want to achieve.[br]But there is a trick so we can get our tangent(s). The [code]Tangent[/code] command has a version with a point and an implicit function as arguments. This works as we want to. So we convert our function f(x) into an implicit equation with [math]y-f\left(x\right)=0[/math] and then use the [code]Tangent[/code] command. Sometimes it is necessary to zoom out to get more tangents.[br]See the following applet

Information: Tangent through point touching function