\documentclass[10pt,a4paper]{report}
\usepackage[height=250mm,width=183mm]{geometry}
\usepackage{fancyvrb,amsmath}
\usepackage[upright]{fourier}

\makeatletter
\newcommand{\executGiacmp}[1]{
\immediate\write18{giac  <#1 } }
\makeatother

\begin{VerbatimOut}{XCASipp.cxx}
Ipp(L):={
u:=L[0];vp:=L[1];a:=L[2];b:=L[3];
u:=unapply(u,x);
vp:=unapply(vp,x);
up:=fonction_derivee(u);
v:=unapply(int(vp(x),x),x);
\\end{cases}
I=\\displaystyle \\int_{"+a+"}^{"+b+"}"+latex(u(x))+"\\times "+latex(vp(x))+"dx=\\Big["+
latex(simplifier(u(x)*v(x)))+"\\Big]_{"+a+"}^{"+b+
"}-\\int_{"+a+"}^{"+b+"}"+latex(simplifier(up(x)))+"\\times "+latex(simplifier(v(x)))+"dx="+
latex(simplifier(int(u(x)*vp(x),x,a,b))) +" } ";
}:;
\end{VerbatimOut}

\begin{VerbatimOut}{XCASipp.giac}
maple_mode(0);
Sortie:=fopen("XCASipp.tex");
Resultat:=cat("Ipp(",donnees);
Resultat:=cat(Resultat,");");
Resultat:=expr(Resultat);
fprint(Sortie,Unquoted,Resultat);
fclose(Sortie);
\end{VerbatimOut}

\newenvironment{ipp}
{\VerbatimEnvironment\begin{VerbatimOut}{XCASipp.user}}
{\end{VerbatimOut}
\executGiacmp{XCASipp.giac}

\input{XCASipp}
}

%%%%%%%%%%%%%%%%%%%%%
%%%% fin du préambule
%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%% on rentre dans l'ordre u, v', a, b

\begin{ipp}
x,exp(x),1,7
\end{ipp}

\vspace{1cm}

\begin{ipp}
x,exp(x),1,t
\end{ipp}

\vspace{1cm}

\begin{ipp}
ln(x),1,1,t
\end{ipp}

\begin{ipp}

\end{ipp}

\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: