I want too trace a graph for this function f(x)=-x²/(x+1)² but when I use tkz-fct I have this problem " Dimension too large "
This is my code:
\documentclass[twoside]{report}
\usepackage[a4paper, left=1.5cm, right=1.5cm]{geometry}
\usepackage{etex}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[explicit,calcwidth]{titlesec}
\usepackage{amsthm,amsfonts}
\usepackage{amsmath,amssymb,graphicx,multicol,mathrsfs, enumerate,kpfonts,eurosym,alterqcm,enumitem,tabularx,variations,pifont,multirow}
\usepackage[francais]{babel}
\usepackage[np]{numprint}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage[many,most]{tcolorbox}
\usepackage{tkz-base}
\usepackage{tkz-fct}
\usetikzlibrary{babel}
\usetikzlibrary{intersections}
\begin{document}
\begin{tikzpicture}
\tkzInit[xmin=-4,xmax=4,ymin=-6,ymax=6,xstep=2,ystep=2]
\tkzAxeXY
\tkzFct[color=red,samples=400,domain=-4:3]{(-1*x**2)/(x+1)**2 -2}
\end{tikzpicture}
\end{document}
Thank you for your answers


shell-escapebecausetkz-fct"outsources" the computations tognuplot. I get the same error withpdflatex --shell-escape file.tex. (Unsurprisingly, as you're dividing by zero, or very close to zero.) – Torbjørn T. Sep 26 '17 at 11:24