EDIT: I tried to add a domain and it still doesn't work.
I did this with desmos and I assume it's correct since it solves my y(0) = -1 initial condition. When I use
\begin{tikzpicture}
\begin{axis}
\addplot[]{((4/17)*cos(deg(x))) + ((1/17)*sin(deg(x))) +((-21/17)*e^(-4*x))};
\end{axis}
\end{tikzpicture}
I tried to add a domain and range to get a code of
\begin{tikzpicture}
\begin{axis}[
xmin = -0.25, xmax = 6,
ymin = -1.25, ymax = 0.25
]
\addplot[]{((4/17)*cos(deg(x))) + ((1/17)*sin(deg(x))) +((-21/17)*e^(-4*x))};
\end{axis}
\end{tikzpicture}
but then I just get
Clearly the issue is the range but I can't seem to get it to register correctly.
As far as I can tell, I properly typed out the function and yet I'm getting vastly different results. Any help is appreciated, I'm very new to LaTeX so I don't exactly know what I'm doing.
domain=-0.25:5
to theaxis
options.xmin
etc only control what is shown, you need to control what is evaluated which needs changing thedomain
which defaults to the interval[-5:5]
, which skews your y range as the exponent is very large forx=-5
.