# Area between two curves with tkz-fct

I use tkz-fct but it produces weird result. I changed the code as indicated by Alain Matthes and it works for Area behind a curve but it doesn't work for Area between curves :

\documentclass[10pt,a4paper]{article}
\usepackage{tikz,tkz-tab,tkz-fct}
\begin{tikzpicture}[scale=1.3]
\tkzInit[xmin=-1,xmax=4,ymin=0,ymax=5]
\tkzGrid
\tkzAxeXY
\tkzFct[domain = -.5:4]{ 4*x-x**2+4/(x**2+1)**2}
\tkzFct[domain = -.5:4]{x-1+4/(x**2+1)**2}
\tkzDrawAreafg[color=green,domain = 1:3]
\tkzRep
\tkzText(5.2,3.5){$\displaystyle{\int_{1}^3 f(x)-g(x)dx}$}
\draw [->] (4.1,3.5) -- (2.6,3);
\tkzText(2.5,4.2){$\mathscr{C}_f$}
\tkzText(2.5,1.2){$\mathscr{C}_g$}
\end{tikzpicture}
\end{document}


Please, could someone help me ?

Once you fix the MWE [missing a package 'mathrsfs' and a opening document], it works just fine on XeLaTeX on Ubuntu...

So anything else to your issue?

\documentclass[10pt,a4paper]{article}
\usepackage{tikz,tkz-tab,tkz-fct,mathrsfs}
\begin{document}
\begin{tikzpicture}[scale=1.3]
\tkzInit[xmin=-1,xmax=4,ymin=0,ymax=5]
\tkzGrid
\tkzAxeXY
\tkzFct[domain = -.5:4]{ 4*x-x**2+4/(x**2+1)**2}
\tkzFct[domain = -.5:4]{x-1+4/(x**2+1)**2}
\tkzDrawAreafg[color=green,domain = 1:3]
\tkzRep
\tkzText(5.2,3.5){$\displaystyle{\int_{1}^3 f(x)-g(x)dx}$}
\draw [->] (4.1,3.5) -- (2.6,3);
\tkzText(2.5,4.2){$\mathscr{C}_f$}
\tkzText(2.5,1.2){$\mathscr{C}_g$}
\end{tikzpicture}
\end{document}


• No, sorry. This doesn't work using updated LaTeX systems, neither using xelatex nor pdflatex. This is not really answering the question. – Gonzalo Medina Aug 29 '15 at 15:24
• Curious since I just compiled it yesterday with TeXLive 2015 installation, using XeLaTeX. – William 'Ike' Eisenhauer Aug 30 '15 at 15:04