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

 How to solve it using python? 1. (9 points) The Lorenz

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!