y=(x²+x+1)/(x²-2x-3)
=(x²-2x-3+3x+3+1)/(x²-2x-3)
=[(x-3)(x+1)+3(x+1)+1]/[(x-3)(x+1)]
=1 +3/(x-3) +(1/4)[1/(x-3)-1/(x+1)]
=1+ (13/4)[1/(x-3)] -(1/4)[1/(x+1)]
y'=0-(13/4)(x-3)'/(x-3)² +(1/4)(x+1)'/(x+1)²
=-13/[4(x-3)²]+1/[4(x+1)²]
也可以直接用公式(u/v)'=(u'v-uv')/v²
y'=[(x²+x+1)'(x²-2x-3)-(x²-2x-3)'(x²+x+1)]/(x²-2x-3)²
=[(2x+1)(x²-2x-3)-(2x-2)(x²+x+1)]/(x²-2x-3)²
=(-3x²-8x-1)/(x²-2x-3)²
=-(3x²+8x+1)/(x²-2x-3)²
两者结果有差异是因为第一种方法先进行了化简,因此求导后得到的也是最简形式,而直接用公式的第二种解法最终结果并没有化到最简.