4

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}

Picture of the result

Please, could someone help me ?

1 Answer 1

1

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}

Generated Output Graph

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .