In[]:=
ClearAll
Out[]=
ClearAll
In[]:=
f[x_]:=(x^2+x+1)/(x-1)
In[]:=
D[f[x],x]
Out[]=
1+2x
-1+x
-
1+x+
2
x
2
(-1+x)
In[]:=
Plot[f[x],{x,-4,4}]
Out[]=
-4
-2
2
4
-15
-10
-5
5
10
15
20
In[]:=
sol=Solve[D[f[x],x]==0,x]
Out[]=
{x1-
3
},{x1+
3
}
In[]:=
FullSimplify[f''[x]/.sol]
Out[]=
-
2
3
,
2
3

In[]:=
Plot[f[x],{x,-5,5},​​Epilog{Red,PointSize[Large],Point[{x,f[x]}/.sol]},AspectRatioAutomatic]
Out[]=
In[]:=
sol1=Solve[D[f[x],{x,2}]==0,x]
Out[]=
{}
In[]:=
cp=Reduce[D[f[x],{x,2}]>0]
Out[]=
x>1
In[]:=
cn=Reduce[D[f[x],{x,2}]<0]
Out[]=
x<1
In[]:=
Plot[{Piecewise[{{f[x],cp}},Undefined],​​Piecewise[{{f[x],cn}},Undefined]},{x,-3,6},​​Epilog{PointSize[Large],Point[{x,f[x]}/.sol]},​​PlotLegendsLineLegend[{"wypukle","wklesle"}]]
Out[]=
wypukle
wklesle
​