\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{letterpaper,total={408pt,9.0in}}
%% Custom Page Layout Adjustments (use latex.geometry)
\usepackage{amsmath,amssymb}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{positioning}
\usepgfplotslibrary{fillbetween}
\usepackage{pstricks}
\usepackage{phaistos}
\usepackage{xcolor}
\ifdefined\tikzset
\tikzset{ampersand replacement = \amp}
\fi
\newcommand{\order}[1]{\left\lvert#1\right\rvert}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\begin{document}
\pagestyle{empty}
\resizebox{\width}{\height}{
\begin{tikzpicture}[
  declare function={
    c(\x)= cos(\x^2*180/3.14159265359);
    sp(\x)=sqrt(4+\x^2*c(\x));
    sm(\x)=sqrt(4-\x^2*c(\x));
    m(\x)= 2+sm(\x);
    o(\x)= 2-sm(\x);
    p(\x)= 2+sp(\x);
    q(\x)= 2-sp(\x);
    f(\x)= \x^2/m(\x);
    g(\x)= m(\x)/c(\x);
    h(\x)= -\x^2/p(\x);
    k(\x)= p(\x)/c(\x);
  }
]
  \begin{axis}[
    xmin = -7,
    xmax = 7,
    ymin = -4,
    ymax = 10.6,
    xtick = {-4,-2,...,4},
    ytick = {-4,-2,...,10},
    minor xtick = {-7,-6,...,7},
    minor ytick = {-4,-3,...,10},
    variable = v,
    color = red,
    mark = none,
    solid,
    axis lines = center,
    axis line style = {<->},
    xlabel = {$x$},
    ylabel = {$y$},
    yticklabel style={inner sep=0.333ex},
    scale only axis,
    tick label style={font=\footnotesize, color = black},
    grid = minor,
    grid style = {solid,gray!40},
  ]
    \addplot[domain=0:2.2] ({f(v)},{m(v)});
    \addplot[domain=2.2:2.3499859792] ({f(v)},{m(v)});
    \addplot[domain=2.6965731707:2.72] ({f(v)},{m(v)});
    \addplot[domain=2.72:3.1] ({f(v)},{m(v)});
    \addplot[domain=3.1:3.36] ({f(v)},{m(v)});
    \addplot[domain=3.36:3.369] ({f(v)},{m(v)});
    \addplot[domain=3.7207600255:3.75] ({f(v)},{m(v)});
    \addplot[domain=3.75:4.1] ({f(v)},{m(v)});
    \addplot[domain=4.1:4.1826819343] ({f(v)},{m(v)});
    \addplot[domain=4.5013070528:4.6] ({f(v)},{m(v)});
    \addplot[domain=4.6:4.8] ({f(v)},{m(v)});
    \addplot[domain=4.8:4.8632109381] ({f(v)},{m(v)});
    \addplot[domain=5.1649321939:5.2] ({f(v)},{m(v)});
    \addplot[domain=5.2:5.4] ({f(v)},{m(v)});
    \addplot[domain=5.4:5.4596904128] ({f(v)},{m(v)});
    \addplot[domain=5.7524607477:5.9970858912] ({f(v)},{m(v)});
    \addplot[domain=6.2854560605:6.4899313929] ({f(v)},{m(v)});
    \addplot[domain=6.7769950285:6.9475348363] ({f(v)},{m(v)});
    \addplot[domain=7.2357791015:7.3762238487] ({f(v)},{m(v)});
    \addplot[domain=7.6680608384:7.7804196739] ({f(v)},{m(v)});
    \addplot[domain=8.0787873209:8.1630812697] ({f(v)},{m(v)});
    \addplot[domain=8.4729783943:8.525239357] ({f(v)},{m(v)});
    \addplot[mark=none] coordinates {({f(2.3499859792)},{m(2.3499859792)}) ({g(2.3499859793)},{o(2.3499859793)})};
    \addplot[domain=2.2795725971:2.3499859793] ({g(v)},{o(v)});
    \addplot[mark=none] coordinates {({f(2.6965731707)},{m(2.6965731707)}) ({g(2.696573171)},{o(2.696573171)})};
    \addplot[domain=2.696573171:2.7240684007] ({g(v)},{o(v)});
    \addplot[mark=none] coordinates {({f(3.369)},{m(3.369)}) ({g(3.3697995683)},{o(3.3697995683)})};
    \addplot[domain=3.36795:3.3697995683] ({g(v)},{o(v)});
    \addplot[domain=0.15:0.9934229315] ({g(v)},{o(v)});
    \addplot[domain=1.4952570458:2.0001872665] ({g(v)},{o(v)});
    \addplot[domain=2.9496641015:3.178782971] ({g(v)},{o(v)});
    \addplot[domain=3.9009258917:4.0194955921] ({g(v)},{o(v)});
    \addplot[domain=0:1.8] ({h(v)},{p(v)});
    \addplot[domain=1.8:2.2] ({h(v)},{p(v)});
    \addplot[domain=2.2:2.8] ({h(v)},{p(v)});
    \addplot[domain=2.8:2.89] ({h(v)},{p(v)});
    \addplot[domain=3.2571424315:3.3] ({h(v)},{p(v)});
    \addplot[domain=3.3:3.75] ({h(v)},{p(v)});
    \addplot[domain=3.75:3.7971078497] ({h(v)},{p(v)});
    \addplot[domain=4.1295834659:4.2] ({h(v)},{p(v)});
    \addplot[domain=4.2:4.5] ({h(v)},{p(v)});
    \addplot[domain=4.5:4.5356939968] ({h(v)},{p(v)});
    \addplot[domain=4.844517562:4.9] ({h(v)},{p(v)});
    \addplot[domain=4.9:5] ({h(v)},{p(v)});
    \addplot[domain=5:5.170055092] ({h(v)},{p(v)});
    \addplot[domain=5.4665876095:5.5] ({h(v)},{p(v)});
    \addplot[domain=5.5:5.7] ({h(v)},{p(v)});
    \addplot[domain=5.7:5.7347036241] ({h(v)},{p(v)});
    \addplot[domain=6.0248230446:6.2484075213] ({h(v)},{p(v)});
    \addplot[domain=6.5357897386:6.7226893127] ({h(v)},{p(v)});
    \addplot[domain=7.0100484639:7.1651804638] ({h(v)},{p(v)});
    \addplot[domain=7.4549045114:7.5811656127] ({h(v)},{p(v)});
    \addplot[domain=7.8758321028:7.9743147713] ({h(v)},{p(v)});
    \addplot[domain=8.2775481783:8.3468023025] ({h(v)},{p(v)});
    \addplot[domain=8.6671994161:8.6968286602] ({h(v)},{p(v)});
    \addplot[mark=none] coordinates {({g(0.15)},{o(0.15)}) ({k(0.15)},{q(0.15)})};
    \addplot[domain=0.15:0.9690222774] ({k(v)},{q(v)});
    \addplot[domain=2.3375568425:2.6564493594] ({k(v)},{q(v)});
    \addplot[domain=3.4567020839:3.6249982793] ({k(v)},{q(v)});
    \addplot[domain=4.3047344897:4.3734360266] ({k(v)},{q(v)});
    \addplot[mark=none] coordinates {({h(3.2571424315)},{p(3.2571424315)}) ({k(3.2571424316)},{q(3.2571424316)})};
    \addplot[domain=3.2571424316:3.2608706576] ({k(v)},{q(v)});
    \addplot[mark=none] coordinates {({h(2.89)},{p(2.89)}) ({k(2.89)},{q(2.89)})};
    \addplot[domain=2.8754877926:2.89] ({k(v)},{q(v)});
    \addplot[domain=1.4584452866:2.0506909475] ({k(v)},{q(v)});
    \addplot[mark=none] coordinates {(3,-2)} node[black] {$x \cos(x y) = 4 - y$};
  \end{axis}
\end{tikzpicture}
}
\end{document}
