Compare commits
No commits in common. "a1928ab84b27e66d364266a5e0174c34e2b36d8c" and "c34beda4ff77283c1a33738edcd02d4ea1246a58" have entirely different histories.
a1928ab84b
...
c34beda4ff
1 changed files with 0 additions and 19 deletions
|
|
@ -1,19 +0,0 @@
|
|||
import numpy as np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
x = np.linspace(0,1,200)
|
||||
p_list = [-100, -10, -1, 0, 1, 10, 100]
|
||||
|
||||
for p in p_list:
|
||||
if p != 0:
|
||||
u = (np.exp(p*x)-1)/(np.exp(p)-1)
|
||||
else:
|
||||
u = x
|
||||
|
||||
plt.plot(x,u, label=f"p={p}")
|
||||
|
||||
plt.xlabel("x")
|
||||
plt.ylabel("u(x)")
|
||||
plt.title("Solution of -u''+pu'=0 with u(0)=0 u(1)=1")
|
||||
plt.legend()
|
||||
plt.show()
|
||||
Loading…
Add table
Add a link
Reference in a new issue