Question

In: Advanced Math

Let M be the integer corresponding to the first letter of your last name. For example,...

Let M be the integer corresponding to the first letter of your last name. For example, if your last name begins with "A", M=1 and if your last name begins with "Z", M=26.

Let k=1/M and consider the logistic equation dy/dt = k y (M - y).

Construct a single figure including

  1. Title "Logistic Equation Slope Field and Euler's Method solutions by FirstName LastName" with your actual first and last names, along the top
  2. Labels for the axes
  3. a slope field for -3 ≤ t ≤ 3, -M/2 ≤ y ≤ 3M/2
  4. Euler's method solutions for initial conditions   y(0)=5M/4, y(0)=M, y(0)=M/2, y(0)=0 and y(0)=-M/4, in each case for -3 ≤ t ≤ 3, h=0.1
  5. For each initial condition, a label "y(0) = (value)" but with the actual value, at an appropriate location
  6. For each solution curve, a label "y(3) ≈ (Euler's method value)" but with the actual value, or "y(3) = ?", at an appropriate location

Last name starts with a P

Solutions

Expert Solution

ANSWER:

Given That Let M be the integer corresponding to the first letter of your last name. For example, if your last name begins with "A", M=1 and if your last name begins with "Z", M=26.

Let k=1/M and consider the logistic equation dy/dt = k y (M - y).

So the python code is:

# FB - 201104096
import science
# initial Order lyric (y' = f(x, y)) problem solver victimization mathematician methodology
# xa: initial price of experimental variable
# xb: final price of experimental variable
# ya: initial price of variable quantity
# n : variety of steps (higher the better)
# Returns price of y at xb.
def Euler(f, xa, xb, ya, n):
h = (xb - xa) / float(n)
x = xa
y = ya
for i in range(n):
y += h * f(x, y)
x += h
return y

# Second Order lyric (y'' = f(x, y, y')) problem solver victimization mathematician methodology
# y1a: initial price of calculation of variable quantity
def Euler2(f, xa, xb, ya, y1a, n):
h = (xb - xa) / float(n)
x = xa
y = ya
y1 = y1a
for i in range(n):
y1 += h * f(x, y, y1)
y += h * y1
x += h
return y

if __name__ == "__main__":
print Euler(lambda x, y: math.cos(x) + science.sin(y), 0, 1, 1, 1000)


Related Solutions

Let M be the integer corresponding to the first letter of your last name. For example,...
Let M be the integer corresponding to the first letter of your last name. For example, if your last name begins with "A", M=1 and if your last name begins with "Z", M=26. Let k=1/M and consider the logistic equation dy/dt = k y (M - y). Construct a single figure including Title "Logistic Equation Slope Field and Euler's Method solutions by FirstName LastName" with your actual first and last names, along the top Labels for the axes a slope...
Write a C++ Program to print the first letter of your first and last name using...
Write a C++ Program to print the first letter of your first and last name using stars. Note: 1) Using nested For Loop 2) The number of lines is given by user. 3) Using one Outer loop to print your letters. 4) Print the letters beside each other.
Select a Fortune 500 company whose name starts with the first letter in your last name...
Select a Fortune 500 company whose name starts with the first letter in your last name and obtain the company’s most recent 10-K report. (You may use the same company that you used previously.) Be sure that the company has a complex capital structure. Attach the equity section of the balance sheet and the notes relevant to answering the following questions: (a) Does the company have preferred stock and common stock (or different classes of common stock)? Do its stocks...
Based on the letter of your last name in ASAP will be how you are assigned...
Based on the letter of your last name in ASAP will be how you are assigned your state: a. Last Name starts with the letter A-D, you choose from one of these states i. Alabama, Alaska, Arizona, Arkansas, California, Colorado, Connecticut, Delaware Introduction Portion (10%) a. Discuss where and how the Coronavirus originated. b. Explain why you chose the state from the given list above; in other words, reasoning based on area, peaked at the better stats first, etc. c....
Using jGRASP, write a Java program named LastnameFirstname10.java, using your last name and your first name,...
Using jGRASP, write a Java program named LastnameFirstname10.java, using your last name and your first name, that does the following: Create two arrays that will hold related information. You can choose any information to store, but here are some examples: an array that holds a person's name and an array that hold's their phone number an array that holds a pet's name and an array that holds what type of animal that pet is an array that holds a student's...
Using jGRASP, write a Java program named LastnameFirstname09.java, using your last name and your first name,...
Using jGRASP, write a Java program named LastnameFirstname09.java, using your last name and your first name, that does the following: Declare an array reference variable called myFavoriteSnacks for an array of String type. Create the array so that it is able to hold 10 elements - no more, no less. Fill the array by having each array element contain a string stating one of your favorite foods/snacks. Note: Only write the name of the snack, NO numbers (i.e. Do not...
Part 1: Create a character array and save your first and last name in it
PROGRAMMING IN C:Part 1:Create a character array and save your first and last name in itNote: You can assign the name directly or you can use the scanf function.Display your name on the screen.Display the address (memory location) in hexadecimal notation of the array. (hint: use %p)Use a for loop to display each letter of your name on a separate line.Part 2:Create a one dimensional array and initialize it with 10 integers of your choice.Create a function and pass the...
Name your file “DMx1_Your last name_Your first name.” You can use MS Word to complete the...
Name your file “DMx1_Your last name_Your first name.” You can use MS Word to complete the matrices (go to Insert, Table, Insert table, fill the table). Save the file as a PDF file. If you draw the matrices on paper, take pictures. Make sure the pictures are clear and readable. Insert the pictures in MS Word document and save it as a PDF file. 1. Align using dot matrix: horizontal sequence – AGGCTCCC, vertical sequence – GCGCTCCG. Trace and explain...
Write the pseudocode that prompts the user for their first and last name. Display the first...
Write the pseudocode that prompts the user for their first and last name. Display the first initial of their first name and their last name to the user. Ask the user to input a phone number. The program checks which part of Colorado a phone number is from using the values below. If the second digit of the phone number is one of the below digits, print the phone number and which part of Colorado it is from. If none...
SQL statmen: List the first name, the last name, the address, the city, the state, the...
SQL statmen: List the first name, the last name, the address, the city, the state, the branchNo, and the email of agents working in the branch B005 and having email addresses ending with extensions different from .com.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT