first of all, I'm new in this "world" of LaTeX.
I have been required to turn in a simple assignment for my calculus class that consist of plotting a function. However, after two days of trying I'm still not able of plotting it in a correct way.
It's hard for me to get plotting skills in a few days so I would like some of your help in order to do this. The function I must plot is
x^3*ln(x)
in the interval [1:2]
. I don't know what command use for the natural logarithm.So far I have this:
Code: Select all
%& --shell-escape
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[margin=1cm]{geometry}
\usepackage{tikz}
\usetikzlibrary{arrows,backgrounds}
\begin{document}
\[
\int\limits_{1}^{2} \bigl( x^3 \ln x \bigr) dx
\]
\bigskip
\begin{center}
\begin{tikzpicture}[samples=200,domain=0:4]
\filldraw[color=gray,domain=1:2] plot(\x,\x^3)--(2,0);
\filldraw[color=white,domain=1:2] plot(\x,{cos(\x r)})--(2,0);
\draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red,->] plot (\x,\x) node[right] {$f(x)=x^3 \ln x$};
\end{tikzpicture}
\end{center}
\end{document}
Thanks in advance!