Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Computational physics. This is an assignment question designed to be done on Python 3.5. please help me figure out the codes needed to solve this

Computational physics. This is an assignment question designed to be done on Python 3.5. please help me figure out the codes needed to solve this question.

image text in transcribed

Here are the questions and codes from part 1 and 2.

image text in transcribed

ANSWER:

def Chebyshev1_recursive(x,n): if n == 0: return 1 elif n == 1: return x else: return 2*x*(Chebyshev1_recursive(x, n-1))-Chebyshev1_recursive(x,(n-2))

import matplotlib.pyplot as plt %matplotlib inline xlist = [] for x in range(-100,102,2): xlist.append(x/100)

for n in range(0,5): ylist = [] for x in range(0,101): ylist.append(Chebyshev1_recursive(xlist[x],n))

plt.plot(xlist, ylist,'-')

image text in transcribed

ANSWER:

from numpy import sin,pi,linspace from pylab import plot,show,subplot

a = [1,3,5,3] # plotting the curves for b = [1,5,7,4] # different values of a/b delta = pi/2 t = linspace(-pi,pi,300)

for i in range(0,4): x = sin(a[i] * t + delta) y = sin(b[i] * t) subplot(2,2,i+1) plot(x,y)

show()

2.3 3) Everything is connected Lissajous figures where a 1, b N (N is a natural number) and N 2 are Chebyshev polynomials of the first kind of degree N Task 3: Check this claim by comparing results from part 1 and part 2 for degree n 5 at the points 2k -1 2n 1,..., n cos Create a table with the results eg. value chebyshev lissajous difference 0.?? 0.?? and briefly discuss them. 2.3 3) Everything is connected Lissajous figures where a 1, b N (N is a natural number) and N 2 are Chebyshev polynomials of the first kind of degree N Task 3: Check this claim by comparing results from part 1 and part 2 for degree n 5 at the points 2k -1 2n 1,..., n cos Create a table with the results eg. value chebyshev lissajous difference 0.?? 0.?? and briefly discuss them

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

Students also viewed these Databases questions

Question

LO4 Identify a system for controlling absenteeism.

Answered: 1 week ago

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago