How to plot complicated graphs? (applied-mathematics for physicists)

328 Views Asked by At

I'm studying Electrical & Computer Engineering and I'm amidst my preparation for an exam in applied-mathematics for physicists. I can't quite put the finger on how to plot "by hand" some complicated graphs and was wondering if anyone could share some of their knowledge on how to begin dealing with such functions.

Here are some examples:

$$ f(x)=\arctan(e^x)\\ g(x)=\tanh(\frac1x)\\ h(x)=\ln(\cos(x))\\ k(x)=\ln(e^x-1)\\ $$

Any help would be much appreciated.

3

There are 3 best solutions below

0
On BEST ANSWER

For example, let's try $f(x) = \ln(\cos(x))$ for $-\pi/2 < x < \pi/2$ (as you mentioned, the full graph consists of translates of this on every interval $(2n-1/2) \pi < x < (2n+1/2) \pi$).

Symmetry: $f(-x) = f(x)$. So it suffices to plot for $0 \le x < \pi/2$ and reflect across the $y$ axis.

$f(0) = \ln(1) = 0$.

$\lim_{x \to \pi/2} f(x) = \lim_{t \to 0+} \ln(t) = -\infty$.

$f'(x) = -\tan(x)$ This is decreasing on $(0, \pi/2)$, $0$ at $x=0$ and tending to $-\infty$ as $x \to \pi/2-$. Thus $f$ is decreasing and concave on $(0, \pi/2)$.

enter image description here

0
On

All your examples involve composition of two functions. There are a number of things which will assist you in sketching such graphs by hand. This in not an exhaustive list:

(1) Determine the domain and range of the functions. For example, on $\ln(\cos(x))$ you know that $x$ can be any real number but $\cos(x)$ will always have a value between $\pm1$. You know that the domain of $\ln$ is the positive real numbers, so $y=\ln(\cos(x))$ will only be defined for value of $x$ for which $\cos(x)>0$. You know that $\ln(1)=0$ and that for $0<x<1$, $\ln(x)<0$ and that $\ln(x)\to-\infty$ as $x\to0^+$.

(2) Try to determine any $x$ or $y$ intercepts of the graph

(3) Try to decide if there are any vertical or horizontal asymptotes

(4) Try to decide if there are some intervals where the graph is positive and some where it is negative.

(5) Find the first and second derivatives to find out where the graph is increasing, decreasing, concave up, concave down.

(6) Check for symmetry. Is $f(-x)=f(x)$? Is $f(-x)=-f(x)$?

(7) Plot a few points

0
On

Each of your "outer" functions—$\arctan$, $\tanh$, and $\ln$—is strictly monotone. You therefore obtain a graph of each type $$ y = \arctan \phi(x),\qquad y = \tanh \phi(x),\qquad y = \ln \phi(x), $$ by graphing $y = \phi(x)$, then suitably distorting in the vertical direction, sending $(x, y)$ to $(x, \arctan y)$, etc.

  • For $\arctan$, the plane is squeezed into the strip $|y| < \pi/2$. Points where $|\phi(x)|$ is large are mapped to points near $y = \pm\pi/2$. Points where $|\phi(x)|$ is small do not move much, because $\arctan y \approx y$ if $y \approx 0$.

  • The function $\tanh$ is similar, except it squeezes the plane into the strip $|y| < 1$.

  • The logarithm stretches the open half-plane $y > 0$ onto the entire plane; the half-plane $y > 1$ maps to the upper half-plane, and the strip $0 < y < 1$ maps to the lower half-plane. Any portion of the graph of $\phi$ lying on or below the $x$-axis disappears, and points where $\phi(x) = 0$ become vertical asymptotes. Every point moves downward since $\ln y < y$ for all $y > 0$. Visually, the result looks as if you've melted the plane so that the $x$-axis has "dropped to height $-\infty$".