diff options
author | Patrik Müller <patrik.mueller@ost.ch> | 2022-05-31 16:31:25 +0200 |
---|---|---|
committer | Patrik Müller <patrik.mueller@ost.ch> | 2022-05-31 16:31:25 +0200 |
commit | 6149839224755c21225d2decddeae12207c2cbab (patch) | |
tree | 3b7a2f02ad8e388c68eb6b5f3ea4144a50c5ad56 /buch/papers/laguerre/scripts/integrand.py | |
parent | Merge branch 'AndreasFMueller:master' into master (diff) | |
download | SeminarSpezielleFunktionen-6149839224755c21225d2decddeae12207c2cbab.tar.gz SeminarSpezielleFunktionen-6149839224755c21225d2decddeae12207c2cbab.zip |
Add rule of thumb, analyse integrand, correct mistake in integration SLP<->LP
Diffstat (limited to 'buch/papers/laguerre/scripts/integrand.py')
-rw-r--r-- | buch/papers/laguerre/scripts/integrand.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/buch/papers/laguerre/scripts/integrand.py b/buch/papers/laguerre/scripts/integrand.py index 43fc1bf..0cf43d1 100644 --- a/buch/papers/laguerre/scripts/integrand.py +++ b/buch/papers/laguerre/scripts/integrand.py @@ -20,29 +20,30 @@ t = np.logspace(*xlims, 1001)[:, None] z = np.array([-4.5, -2, -1, -0.5, 0.0, 0.5, 1, 2, 4.5]) r = t ** z -fig, ax = plt.subplots(num=1, clear=True, constrained_layout=True, figsize=(6, 4)) +fig, ax = plt.subplots(num=1, clear=True, constrained_layout=True, figsize=(5, 3)) ax.semilogx(t, r) ax.set_xlim(*(10.0 ** xlims)) ax.set_ylim(1e-3, 40) -ax.set_xlabel(r"$t$") -ax.set_ylabel(r"$t^z$") +ax.set_xlabel(r"$x$") +ax.set_ylabel(r"$x^z$") ax.grid(1, "both") -labels = [f"$z={zi:.1f}$" for zi in np.squeeze(z)] -ax.legend(labels, ncol=2, loc="upper left") +labels = [f"$z={zi: 3.1f}$" for zi in np.squeeze(z)] +ax.legend(labels, ncol=2, loc="upper left", fontsize="small") fig.savefig(f"{img_path}/integrands.pgf") z2 = np.array([-1, -0.5, 0.0, 0.5, 1, 2, 3, 4, 4.5]) -r2 = t**z2 * np.exp(-t) +e = np.exp(-t) +r2 = t ** z2 * e -fig2, ax2 = plt.subplots(num=2, clear=True, constrained_layout=True, figsize=(6, 4)) +fig2, ax2 = plt.subplots(num=2, clear=True, constrained_layout=True, figsize=(5, 3)) ax2.semilogx(t, r2) # ax2.plot(t,np.exp(-t)) -ax2.set_xlim(10**(-2), 20) +ax2.set_xlim(10 ** (-2), 20) ax2.set_ylim(1e-3, 10) -ax2.set_xlabel(r"$t$") -ax2.set_ylabel(r"$t^z e^{-t}$") +ax2.set_xlabel(r"$x$") +ax2.set_ylabel(r"$x^z e^{-x}$") ax2.grid(1, "both") -labels = [f"$z={zi:.1f}$" for zi in np.squeeze(z2)] -ax2.legend(labels, ncol=2, loc="upper left") +labels =[f"$z={zi: 3.1f}$" for zi in np.squeeze(z2)] +ax2.legend(labels, ncol=2, loc="upper left", fontsize="small") fig2.savefig(f"{img_path}/integrands_exp.pgf") -plt.show() +# plt.show() |