Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to solve it using python? 1. (9 points) The Lorenz equations are the system of nonlinear differential equations dx dt dt dt where ?,

image text in transcribed

How to solve it using python?

1. (9 points) The Lorenz equations are the system of nonlinear differential equations dx dt dt dt where ?, ? and ? are positive numbers. Write a function called lorenz which takes input parameters signa, rho, beta, uo, to, tf, N and plot_vars (with default value [0,1]). The function computes and plots a numerical approximation of the corresponding solution of the Lorenz equations using the function scipy.integrate.odeint. The input parameters are: o sigma, rho and beta define the parameters ?, ? and ? o u0 is a list of numbers of length 3 defining the initial conditions [x(to), y(to), z(to)] o t0 is the start of the interval of integration [to, tf] o tf is the end of the interval of integration to, tfl o N is an integer specifying the number of evenly spaced points from to to tf (inclusively) over which to compute the solution of the system o plot-vars is a list of length 2 specifying which 2 components to plot where z = 0, y = 1 and ? : 2 For example, if plot-vars is ?0, 11 then plot the solution x versus y. If plot.vars is 1,2] then plot the solution y versus z. Note x versus y means z is the horizontal axis and y is the vertical. Default value is [0,1] which plots x versus y The function lorenz returns a 2D Numpy array with 4 columns o column at index 0 is the array of N evenly spaced t values from to to tf (inclusively) o column at index 1 is the array of r values of the solution o column at index 2 is the array of y values of the solution o column at index 3 is the array of z values of the solution

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_2

Step: 3

blur-text-image_3

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

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions