微分の応用
1 接線,関数の増減
\[例題1 極線 y=\log xについて,次の接線の方程式を求めよ\\2 いろいろな微分の応用
\[例題1 関数 y=x+\sqrt{1-x^2}の最大値と最小値を求めよ。\] 無理方程式はGeogebraのほうが優れている。微分の応用
1 接線,関数の増減
\[例題1 極線 y=\log xについて,次の接線の方程式を求めよ\\(%i1) |
tangentLine(a,b,f):=block( f(x):=f, g(x):=diff(f,x), if b=subst(a,x,f(x)) then print("y=",expand(subst(a,x,g(x))*(x-a)+b)) else block(h(p):=subst(p,x,g(x))*(x-p)+subst(p,x,f(x)), l:solve(subst(p,x,g(x))*(a-p)+subst(p,x,f(x))=b,p), for i:1 thru length(l) do print("y=",expand(ev(h(p),l[i]))) )) $ |
(%i2) | solve(diff(log(x),x)=%e,x); |
(%i3) | tangentLine(%e^(-1),-1,log(x))$ |
(%i4) |
tangentLine1(a,b,f):=block( f(x):=f, g(x):=diff(f,x), h(p):=subst(p,x,g(x))*(x-p)+subst(p,x,f(x)), l:solve(subst(p,x,g(x))*(a-p)+subst(p,x,f(x))=b,p), for i:1 thru length(l) do print("y=",expand(ev(h(p),l[i]))) ) $ |
(%i5) | tangentLine1(0,0,log(x))$ |
(%i6) | wxplot2d([log(x),%e*x-2,x/%e], [x,-1,4],[y,-2,2])$ |
(%i7) |
inpli(a,b,f):=block( m:ev(del(y)/del(x),solve(diff(f),del(y))/del(x)), m:subst(b,y,subst(a,x,m)), print("y=",expand(m*(x-a)+b)) )$ |
(%i8) | inpli(-2,1,x^2/8+y^2/2=1)$ |
(%i9) |
meanv(a,b,f):=block( f(x):=f, print((b-a)*subst(a,x,diff(f(x),x)),"<",subst(b,x,f(x))-subst(a,x,f(x)), "<",(b-a)*subst(b,x,diff(f(x),x))) )$ |
(%i10) | meanv(0,a,%e^x)$ |
(%i11) | wxplot2d([%e^x,(%e-1)*x+1], [x,-1/2,3/2])$ |
(%i12) |
maxmin(f):=block( f(x):=f, g(x):=diff(f(x),x), h(x):=diff(g(x),x), l:solve(g(x)=0,x), for i:1 thru length(l) do block( if subst(ev(x,l[i]),x,h(x))<0 then s:"Local Max" else if subst(ev(x,l[i]),x,h(x))>0 then s:"Local Min" else s:"inflection point", print(s,"x=",ev(x,l[i]),"y=",subst(ev(x,l[i]),x,f(x))) ) )$ |
(%i13) | maxmin(x^4-4*x^2)$ |
(%i14) | wxplot2d([x^4-4*x^2], [x,-3,3])$ |
(%i15) |
trigmaxmin(f):=block( f(x):=f, g(x):=trigsimp(diff(f(x),x)), h(x):=diff(g(x),x), l:solve(g(x)=0,x), for i:1 thru length(l) do block( if subst(ev(x,l[i]),x,h(x))<0 then s:"Local Max" else if subst(ev(x,l[i]),x,h(x))>0 then s:"Local Min" else s:"inflection point", print(s,"x=",ev(x,l[i]),"y=",subst(ev(x,l[i]),x,f(x))) ) )$ |
(%i16) | trigmaxmin(sin(x)*(1+cos(x)))$ |
(%i17) | wxplot2d([sin(x)*(1+cos(x))], [x,-3,3])$ |
(%i18) | f(x):=abs(x-3)*sqrt(x); |
(%i19) | diff(f(x),x); |
(%i20) | ratsimp(%); |
(%i21) | factor(%); |
(%i22) | maxmin(%e^(-x^2))$ |
(%i23) |
maxmin1(f):=block( f(x):=f, g(x):=diff(f(x),x,2), h(x):=diff(g(x),x), l:solve(g(x)=0,x), for i:1 thru length(l) do block( if subst(ev(x,l[i]),x,h(x))<0 then s:"down-upwordconvex" else if subst(ev(x,l[i]),x,h(x))>0 then s:"up-downwordconvex" else s:"inflection point", print(s,"x=",ev(x,l[i]),"y=",subst(ev(x,l[i]),x,f(x))) ) )$ |
(%i24) | maxmin1(%e^(-x^2))$ |
(%i25) | partfrac(x^2/(x-2),x); |
(%i26) | maxmin(x^2/(x-2))$ |
(%i27) | wxplot2d([x^2/(x-2),x+2], [x,-5,10],[y,-10,20])$ |
2 いろいろな微分の応用
例題1 関数 y=x+\sqrt{1-x^2}の最大値と最小値を求めよ。\](%i28) | wxplot2d([x+sqrt(1-x^2)], [x,-1,1])$ |
(%i29) | f(x):=x+sqrt(1-x^2); |
(%i30) | g(x):=diff(f(x),x); |
(%i31) | g(x); |
(%i32) | ratsimp(g(x)); |
(%i33) | solve((sqrt(1-x^2))^2=x^2,x); |
(%i34) | taylor(%e^x,x,0,2); |
(%i35) | wxplot2d([%e^x,1+x], [x,-3,3])$ |
(%i36) | wxplot2d([%e^x-x-1], [x,-3,3])$ |
(%i37) | maxmin(%e^x-x-1)$ |
(%i38) | wxplot2d([%e^x/x], [x,-2,2],[y,-5,5])$ |
(%i39) | maxmin(%e^x/x)$ |
(%i40) | S(t):=%pi*r(t)^2$ |
(%i41) | rr(t):=diff(r(t),t); |
(%i42) | diff(S(t),t); |
(%i43) | solve(%=3,rr(t)); |
(%i44) | subst(6,r(t),%); |
微分の応用
1 接線,関数の増減
法線:normal2 いろいろな微分の応用
媒介変数表示,媒介変数:parameter,parametric representation