\documentclass[notitlepage, 12pt]{amsart}
\usepackage{amsthm, amsmath, amsaddr, amssymb, graphicx, dsfont,}
\usepackage[dvipsnames]{xcolor}
\renewcommand{\baselinestretch}{1.2}
\usepackage{tikz}
\usepackage[capposition=bottom]{floatrow}
\usepackage{float}
\begin{document}
\begin{figure}[H]
\centering
\begin{tikzpicture}[xscale=8,yscale=8]
\def\epsi{0.05};
\def\aa{0.6};
\def\suppd{0};
\def\suppe{(1-\aa)/(\aa)};
\def\pd{1-\aa};
\def\yd{\pd*(\suppe-\suppd)};
\draw [<->] (0,1.1)--(0,0)--(1.1,0);
\draw (0,{(1-\aa)^2/\aa})--(1,{\yd});
\end{tikzpicture}
\end{figure}
\end{document}
The algebra indicates \yd should be $\frac{(1-\alpha)^2}{\alpha}$, but the graph I draw suggests it is not the case (the line is not horizontal). I was wondering what is going wrong.
\defto over-write core latex commands with no warning is somewhat risky – David Carlisle Aug 27 '23 at 11:07\defshould not be used, a latex definition such as\newcommandwould have alerted you. (\aa) – David Carlisle Aug 27 '23 at 11:26\ydwill expand to{1-\aa*(\suppe-\suppd)}. You need to define\pdto be(1-\aa)or enclose\pdwith parentheses inside the defintion of\yd. TeX macros aren't variables. It's just “dumb” substitution. – Qrrbrbirlbel Aug 27 '23 at 11:35\pgfmathsetmacro\pd{1-\aa}which will evaluate1-\aaand store the result in\pd. (Though, just like\defPGFMath won't check whether the macro is already defined.) Or define your own PGFMath functions. – Qrrbrbirlbel Aug 27 '23 at 11:42