Fonction intégrale avec tikz
📅 April 18, 2024 | 👁️ Views: 139
\documentclass{standalone}
\standaloneconfig{border=2mm 2mm 2mm 2mm}
\usepackage{pgfplots}
\usepackage{amsmath}
\pgfplotsset{compat=newest}
% Define a function for the integrand
\pgfmathdeclarefunction{integrand}{1}{%
\pgfmathparse{(1)/(sqrt(1+#1^2+ln(#1)^2))}%
}
% Define a function for numerical integration using trapezoidal rule
\pgfmathdeclarefunction{trapz}{3}{%
\pgfmathparse{(#3-#2)/2 * (integrand(#2) + 2*integrand((#2+#3)/2) + integrand(#3))}%
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel={$f(x)$},
xmin=0, xmax=20, % Adjust x-axis limits
ymin=-2, ymax=7, % Adjust y-axis limits
axis lines=middle,
unbounded coords=jump,
enlargelimits=true,
]
% Plot the integral curve using numerical integration
\addplot [blue, domain=0:15, samples=200] {trapz(0,x,10)};
\addplot [red, thick] {int((1)/(sqrt(1+x^2+ln(x)^2)))};
\end{axis}
\node[blue, anchor=west] at (2,5) {$\text{trapez}(a, b, n) = \frac{b-a}{2n} \left( f(a) + 2\sum_{i=1}^{n-1} f\left(a + \frac{i(b-a)}{n}\right) + f(b) \right)$};
\node[red, anchor=west] at (2,4) {$F(x) = \int_0^x \frac{1}{\sqrt{1+t^2+\ln^2 t}} dt$};
\node[red, anchor=west] at (2,3) {$F(0) = 1$};
\end{tikzpicture}
\end{document}
\documentclass{standalone}
\standaloneconfig{border=2mm 2mm 2mm 2mm}
\usepackage{pgfplots}
\usepackage{amsmath}
\pgfplotsset{compat=newest}
% Define a function for the integrand
\pgfmathdeclarefunction{integrand}{1}{%
\pgfmathparse{(1)/(sqrt(1+#1^2+ln(#1)^2))}%
}
% Define a function for numerical integration using trapezoidal rule
\pgfmathdeclarefunction{trapz}{3}{%
\pgfmathparse{(#3-#2)/2 * (integrand(#2) + 2*integrand((#2+#3)/2) + integrand(#3))}%
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=$x$,
ylabel={$f(x)$},
xmin=0, xmax=20, % Adjust x-axis limits
ymin=-2, ymax=7, % Adjust y-axis limits
axis lines=middle,
unbounded coords=jump,
enlargelimits=true,
]
% Plot the integral curve using numerical integration
\addplot [blue, domain=0:15, samples=200] {trapz(0,x,10)};
\addplot [red, thick] {int((1)/(sqrt(1+x^2+ln(x)^2)))};
\end{axis}
\node[blue, anchor=west] at (2,5) {$\text{trapez}(a, b, n) = \frac{b-a}{2n} \left( f(a) + 2\sum_{i=1}^{n-1} f\left(a + \frac{i(b-a)}{n}\right) + f(b) \right)$};
\node[red, anchor=west] at (2,4) {$F(x) = \int_0^x \frac{1}{\sqrt{1+t^2+\ln^2 t}} dt$};
\node[red, anchor=west] at (2,3) {$F(0) = 1$};
\end{tikzpicture}
\end{document}
Related Courses, Exams, and Exercises
- Integral shading area under a curve Course
- Intégrale: Aire d'une partie entre deux graphes Course
- LaTeX Figures Course
Course PDF:
📥 Download Fonction intégrale avec tikz (PDF)
if you find this content helpful, Please consider supporting me with a small donation
إن وجدت هذا المحتوى مفيدا، من فضلك إدعمني بمبلغ بسيط كتبرع
Buy me a coffee — إشتر لي قهوة
PayPal.me • عبر بايبالOr bank transfer • أو حوالة بنكية
Titulaire : RADOUAN MOSAID RIB : 230 090 6501953211022000 65 IBAN : MA64 2300 9065 0195 3211 0220 0065 BIC / SWIFT : CIHMMAMC
Most Viewed Courses
Tous les sujets des suites numériques des examens nationaux 2008 - 2022
Views: 1.63K
Exam • Maths • 2 Bac Science
DM 1 - Arithmetiques, Calcul vectoriel et projection
Views: 1.56K
Exercise • Maths • Tronc Commun Sciences
MATHEMATIQUES Examens nationaux 2003-2021 2 Bac.Sciences expérimentales
Views: 1.52K
Exam • Maths • 2 Bac Science
Control 01 S01 En arithmétiques et Calcul vectoriel - A 2025-2026
Views: 1.49K
Exam • Maths • Tronc Commun Sciences
Recent Articles
Boosting LaTeX Editing with Custom Vim Mappings
23 Nov 2025
Quran Search: A Feature rich and modern design
13 Feb 2025