1

This is the image I would like to obtain enter image description here

And this is my suggestion so far

\documentclass[a4paper ,11pt]{article}
\usepackage{tikz}

\begin{document}

 \begin{tikzpicture}[y={(1cm,-0.5cm)}, x={(-1cm,-0.5cm)}, z={(0cm,1cm)}]
 \coordinate (O) at (0, 0, 0);
 \draw[-latex] (O) -- +(5, 0, 0) node [left] {$x$};
 \draw[-latex] (O) -- +(0, 7, 0) node [right] {$y$};
 \draw[-latex] (O) -- +(0, 0, 7) node [above] {$z$};

  \draw[thick, variable=\x, domain=0.13:7] plot (0,\x,{1/(\x)+(1.2^\x)});
  \draw[thick, variable=\x, domain=0.13:7] plot (5,\x,{1/(\x)+(1.2^\x)-1.2});

  %\draw[thick, variable=\x, domain=-2:3] plot (0,{\x+4},{1.25*\x});
  %\draw[thick, variable=\x, domain=-4.9:0.1] plot (0,{\x},{1.25*\x+8.6});



 \end{tikzpicture}
\end{document}

How can I continue? Thanks.

4
  • 1
    you can try with pgfplots
    – Ignasi
    Jun 20, 2016 at 16:07
  • @Ignasi: This is my attempt with pgfplots, but I have other problems with that.
    – Andrea
    Jun 20, 2016 at 16:13
  • 1
    Then, I think this question could be closed. What do you think?
    – Ignasi
    Jun 20, 2016 at 16:31
  • @Ignasi: With this approach I can draw the lines, but I can't color the region. With the pgfplots approach I have more problems. But if you think that this way leads to nothing, I can close it.
    – Andrea
    Jun 20, 2016 at 16:45

2 Answers 2

5

You can fill the area with TikZ.

\documentclass[a4paper ,11pt]{article}
\usepackage{tikz}

\begin{document}

 \begin{tikzpicture}[y={(1cm,-0.5cm)}, x={(-1cm,-0.5cm)}, z={(0cm,1cm)}]
 \coordinate (O) at (0, 0, 0);
 \draw[-latex] (O) -- +(5, 0, 0) node [left] {$x$};
 \draw[-latex] (O) -- +(0, 7, 0) node [right] {$y$};
 \draw[-latex] (O) -- +(0, 0, 7) node [above] {$z$};

  \draw[thick, variable=\x, domain=0.13:7] plot (0,\x,{1/(\x)+(1.2^\x)});
  \draw[thick, variable=\x, domain=0.13:7] plot (5,\x,{1/(\x)+(1.2^\x)-1.2});

  \draw[thick, variable=\x, domain=-2:3] plot (0,{\x+4},{1.25*\x});
  \draw[thick, variable=\x, domain=-4.9:0.1] plot (0,{\x},{1.25*\x+8.6});

    \draw[red, fill=green] (0,1,2.2) plot[variable=\x, domain=1:3] (0,\x,{1/(\x)+(1.2^\x)}) -- (5,3,.86133) plot[variable=\x, domain=3:1] (5,\x,{1/(\x)+(1.2^\x)-1.2})--(0,1,2.2);

 \end{tikzpicture}
\end{document}

enter image description here

3

Here is an alternative way to draw the end lines. I also simplified the fill a bit.

\documentclass{standalone}
\usepackage{tikz}

\begin{document}

 \begin{tikzpicture}[y={(1cm,-0.5cm)}, x={(-1cm,-0.5cm)}, z={(0cm,1cm)}]
 \coordinate (O) at (0, 0, 0);
 \draw[-latex] (O) -- +(5, 0, 0) node [left] {$x$};
 \draw[-latex] (O) -- +(0, 7, 0) node [right] {$y$};
 \draw[-latex] (O) -- +(0, 0, 7) node [above] {$z$};

  \draw[thick, variable=\x, domain=0.13:7] plot (0,\x,{1/(\x)+(1.2^\x)});
  \draw[thick, variable=\x, domain=0.13:7] plot (5,\x,{1/(\x)+(1.2^\x)-1.2});
  \def\x{0.13}
  \draw[thick] plot coordinates{(0,\x,{1/(\x)+(1.2^\x)}) (5,\x,{1/(\x)+(1.2^\x)-1.2})};
  \def\x{7}
  \draw[thick] plot coordinates{(0,\x,{1/(\x)+(1.2^\x)}) (5,\x,{1/(\x)+(1.2^\x)-1.2})};
  \draw[red, fill=green, fill opacity=0.5] plot[variable=\x, domain=1:3] (0,\x,{1/(\x)+(1.2^\x)})
    -- plot[variable=\x, domain=3:1] (5,\x,{1/(\x)+(1.2^\x)-1.2})--cycle;

 \end{tikzpicture}
\end{document}

demo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.