Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1: Assign the arguments to the three plt.plot() methods in the cell below using the following conditions for y(x): 1. v(n = 1) 2.

image text in transcribed

Exercise 1: Assign the arguments to the three plt.plot() methods in the cell below using the following conditions for y(x): 1. v(n = 1) 2. y(n = 1.5) 3. y(n = 2) Hnt: The method that returns the sin of its argument is np.sin() and can be called using the statement np.pi (1 mark) In (): import numpy as np #importing the numpy module import matplotlib.pyplot as plt #importing the matplotlib.pyplot module #define variables length = 1 #Length of the box in meters position = np. linspace(0, length, 100) #defining an array for the position axis that will span the length of the bo def psi(x, n, a): #wave function for the particle in a box return (np.sin((n*pi*x)/a) #Condition 1 plt.plot("x=1", "Y=", label = "$\psi (n = 1)$") #Condition 2 plt.plot("x=1.5", "Y=", label = "$\psi (n = 1.5)$") #Condition 3 plt.plot("x=2", "Y=", label = "$\psi (n = 2)$") ## Methods to decorate the plot ## plt. legend (fontsize = 14) pit.xlabel("Position", fontsize = 14) plt.ylabel("V(x)", fontsize = 14)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Analysis Synthesis And Design Of Chemical Processes

Authors: Richard Turton, Richard C. Bailie, Wallace B. Whiting, Joseph A. Shaeiwitz

3rd Edition

0135129664, 978-0135129661

More Books

Students also viewed these Chemical Engineering questions

Question

Determine the following indefinite integrals: x(1 - 3x)5 dx

Answered: 1 week ago

Question

5-50. Based on the information, I think we should buy the property.

Answered: 1 week ago