解析:因为y′=2x-,所以在点(1,2)处的切线方程的斜率为y′=2×1-1=1,所以切线方程为y-2=x-1,即x-y+1=0.
答案:x-y+1=0
7.已知函数f(x)=f′cos x+sin x,则f的值为________.
解析:∵f′(x)=-f′sin x+cos x,
∴f′=-f′×+,得f′=-1.
∴f(x)=(-1)cos x+sin x.∴f=1.
答案:1
8.若曲线f(x)=xsin x+1在x=处的切线与直线ax+2y+1=0互相垂直,则实数a=________.
解析:因为f′(x)=sin x+xcos x,
所以f′=sin+cos=1.
又直线ax+2y+1=0的斜率为-,
所以根据题意得1×=-1,解得a=2.
答案:2
9.求下列函数的导数:
(1)y=-ln x; (2)y=(x2+1)(x-1);
(3)y=; (4)y=;
(5)y=x; (6)y=cos x·sin 3x.
解:(1)y′=(-ln x)′
=()′-(ln x)′=-.
(2)y′=[(x2+1)(x-1)]′
=(x3-x2+x-1)′=(x3)′-(x2)′+(x)′-(1)′
=3x2-2x+1.