\(y'=\dfrac{\left(x^2+x-1\right)'\left(x+2\right)-\left(x^2+x-1\right)\cdot\left(x+2\right)'}{\left(x+2\right)^2}\)
\(=\dfrac{\left(2x+1\right)\left(x+2\right)-\left(x^2+x-1\right)}{\left(x+2\right)^2}=\dfrac{2x^2+4x+x+2-x^2-x+1}{\left(x+2\right)^2}\)
\(=\dfrac{x^2+4x+3}{\left(x+2\right)^2}\)
Δ vuông góc y=x-1
=>Δ: y=-x+b
=>f'(x)=-1
=>x^2+4x+3=-x^2-4x-4
=>2x^2+8x+7=0
=>(x=(-4+căn 2)/2) hoặc x=(-4-căn 2)/2
Th1: x=(-4+căn 2)/2
f'(x)=-1; f(x)=(-6+3căn 2)/2
y=f'(x0)(x-x0)+f(x0)
\(=-1\left(x-\dfrac{-4+\sqrt{2}}{2}\right)+\dfrac{-6+3\sqrt{2}}{2}\)
\(=-x+\dfrac{-4+\sqrt{2}}{2}+\dfrac{-6+3\sqrt{2}}{2}=-x-5+2\sqrt{2}\)
TH2: x=(-4-căn 2)/2
f'(x)=-1; f(x)=(-6-3căn 2)/2
y=-(x+(4+căn 2)/2)+(-6-3căn 2)/2
=-x+(-4-căn 2-6-3căn 2)/2
=-x-3-2căn 2