# How to draw this function?

How can I draw this function in LaTeX?

Edit: i did something good but fig 1 does not work how i want

%---------------------------FIGURE 1-------------------------------------------\begin{center}
\begin{tikzpicture}
%----------------------ASSSI---------------------
\draw[thick,->] (0,0) -- (4,0) node[anchor=north west] {tempo};
\draw[thick,->] (0,0) -- (0,4) node[anchor=south east] {velocità};
%---------------------- MOTO --------------------
\draw[smooth, domain=0:4,thick]
plot (\x,{exp(-\x)}) node [right]{};
\end{tikzpicture}
\end{center}

%----------------------------- END FIGURE 1----------------------------------------------
%----------------------------- FIGURE 2--------------------------------------------------

\begin{center}
\begin{tikzpicture}
%----------------------ASSSI---------------------
\draw[thick,->] (0.33,0) -- (4.33,0) node[anchor=north west] {tempo};
\draw[thick,->] (0.33,0) -- (0.33,4) node[anchor=south east] {posizione};
%---------------------- MOTO --------------------
\draw[smooth, domain=0.335:4,thick]
plot (\x,{3-(1/(\x))}) node [right]{};
\end{tikzpicture}
\end{center}
%----------------------------END FIGURE 2----------------------------------------------

• Welcome to TeX SX! Do you have the formulæ for these functions? Commented Mar 15, 2021 at 9:27
• If you have the function you can try it with this answer here: Graphing Equations in Overleaf Commented Mar 15, 2021 at 9:46
• What exactly in figure 1 is wrong? Be specific please so that we can help fix the specific problem. Is figure 2 OK? Commented Mar 15, 2021 at 11:23
• Figure 2 is Ok, figure 1 i want that the function starts higher in y axe Commented Mar 15, 2021 at 11:28

\documentclass[varwidth,
border=3.141592]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
% ASSSI
\draw[<->] (0,4) -- node[left] {tempo}      (0,0)
-- node[below] {velocità}  (4,0);
% MOTO
\draw[domain=0:3.5, samples=31, thick] plot (\x,{3*exp(-\x)});
\end{tikzpicture}

\begin{tikzpicture}
% ASSSI
\draw[<->] (0,4) -- node[left]  {tempo}     (0,0)
-- node[below] {posizione} (4,0);
% MOTO
\draw[domain=0:3.5, samples=31, thick] plot (\x, {3-3*exp(-\x)}); % <--- corrected
\end{tikzpicture}

\end{document}

• Thank you a lot, I cant upvote at the moment becouse i haven't enought reputaton but i will when i can. Commented Mar 15, 2021 at 13:46
• @Livoree, no problem, however, if you liked you can already accept answer ;-) Commented Mar 15, 2021 at 14:08
• Done , ty again :) Commented Mar 15, 2021 at 14:18