1

I am trying to plot a function in terms of another one, but my code is taking too long and at the end i am not getting any plot.

The function that i am trying to plot is: i_c(U_c(x))

U_c(x) = 5+exp(-1266.77x)(-5cos(deg(5508.55x))+10.3sin(deg(5508.55x)))

i_c(x)=exp(-1266.77x)(6.3cos(deg(5508.55x))+1.5sin(deg(5508.55x)) 

%i_c(x)= exp(-1266.77*x)*(6.3*cos(deg(5508.55*x))+1.5*sin(deg(5508.55*x))

%u_c(x)= 5+exp(-1266.77x)(-5cos(deg(5508.55x))+10.3sin(deg(5508.55x)))

\begin{tikzpicture} \begin{axis}[ title = {Verlauf der Kondensatorspannung nach öffnen des Schalters}, xlabel = {t in s}, ylabel= {$u_C(t)$ in V}, xmin = -10, xmax = 10, ymin = -10, ymax = 10, xtick distance = 1, ytick distance = 2, grid = both, minor tick num = 1, major grid style = {lightgray}, minor grid style = {lightgray!0.25}, width = \textwidth, height = 0.5\textwidth] \addplot[ domain = -10:10, samples = 200, smooth, thick, blue,] {exp(-1266.775+exp(-1266.77x)(-5cos(deg(5508.55x))+10.3sin(deg(5508.55x))))(6.3cos(deg(5508.555+exp(-1266.77x)(-5cos(deg(5508.55x))+10.3sin(deg(5508.55x)))))+1.5sin(deg(5508.555+exp(-1266.77x)(-5cos(deg(5508.55x))+10.3sin(deg(5508.55x)))))}; \end{axis} \end{tikzpicture}

MS-SPO
  • 11,519
Juan
  • 83
  • 5
  • 1
    TeX isn't supposed to be fast at doing math. (although you can enable Lua floating-point calculation backend https://tex.stackexchange.com/questions/611573/pgfplots-strange-bump-in-tanh-function ) — if that doesn't work generate a table of values with another programming language and include in. – user202729 Dec 15 '21 at 16:13

0 Answers0