# +----------------------------------------------------+
# |                  Lekce 1 - demo 2                  |
# +----------------------------------------------------+
#  FINITE DIFFERENCE METHODS for initial value problem
#   
#  Eigenmodes blown up in unstable solution
#  to be loaded after Demo1, uses its definitions

#highest mode:
plt.plot(x,np.sin(x*np.pi*(Nx-1)),'bo')
plt.plot(x,np.sin(x*np.pi*(Nx-1)),'b')
plt.show()

#second highest mode:
plt.plot(x,np.sin(x*np.pi*(Nx-2)),'bo')
plt.plot(x,np.sin(x*np.pi*(Nx-2)),'b')
plt.show()

#mixtures:
plt.plot(x,np.sin(x*np.pi*(Nx-1))-0.5*np.sin(x*np.pi*(Nx-2)),'bo')
plt.plot(x,np.sin(x*np.pi*(Nx-1))-0.5*np.sin(x*np.pi*(Nx-2)),'b')
plt.show()

plt.plot(x,np.sin(x*np.pi*(Nx-1))-0.2*np.sin(x*np.pi*(Nx-2)),'bo')
plt.plot(x,np.sin(x*np.pi*(Nx-1))-0.2*np.sin(x*np.pi*(Nx-2)),'b')
plt.show()

