(*pomocniczadefinicja*)arrows[function_,x0_,n_]:=Module[{l=NestList[function,x0,n]},l=Prepend[Flatten[Transpose[{Transpose[{Most[l],Rest[l]}],Transpose[{Rest[l],Rest[l]}],Transpose[{Rest[l],0Rest[l]}]}],1],{l[[1]],0}];Arrow/@Transpose[{Most[l],Rest[l]}]]
In[]:=
(*zadanie1*)Sum[k(k-1),{k,2,n}]Sum[k^2,{k,1,n}]Sum[k^3,{k,1,n}]
Out[]=
1
3
Out[]=
1
6
Out[]=
1
4
2
n
2
(1+n)
In[]:=
(*zadanie2*)n=Range[40];ListStepPlot[{FoldList[Plus,1/n^2],2n/(n+1)}]
Out[]=
In[]:=
(*zadanie3*)n=Range[40];ListStepPlot[{Sqrt[n],FoldList[Plus,1/Sqrt[n]],2Sqrt[n]}]
Out[]=
(*zadanie8*)f=Function[x,(x^2+1)/4];Show[Plot[{f[x],x},{x,0,6},AspectRatioAutomatic,ImageSize800],Graphics[{Arrowheads[Small],Thickness[Large],Red,arrows[f,0,4],Purple,arrows[f,2,4],Brown,arrows[f,4,4]}]]
Out[]=
In[]:=
(*zadanie10*)f=Function[x,x^3+1/4x-1/4];Show[Plot[{f[x],x},{x,-2,2},AspectRatioAutomatic,PlotRange{-3,3},ImageSize800],Graphics[{Arrowheads[Small],Thickness[Large],Red,arrows[f,-.53,30],Purple,arrows[f,0.9,30],Brown,arrows[f,1.1,4]}]]
Out[]=