Numerically Solve the Following: 1. Use Euler’s Method: du/dt = v dv/dt = -kv - u^3 + B cos(t) u(0) = 1.0 v(0) = 1.0 k = 0.4 B = 20.0 h = 0.01 i = 10000 - Write the data (y1, y2) to a file named ?LASTNAME_Prob1.dat? Example: If your name is John Doe – file name would be ?DOE_Prob1.dat? - Plot the result with lines using GNUPLOT (Hint: see lecture 08) - Submit full code (copy and paste). Plot must be on a separate page. - Run the code again and plot the result for: k = 0.1 B = 11.0
Added by Antonio R.
Close
Step 1
We have: du/dt = dv ~ kv ~ u^3 + Bcos(t) u(0) = 1.0 v(0) = 1.0 We also have the values for k, B, h, and i: k = 0.4 B = 20.0 h = 0.01 i = 10000 Now, let's implement Euler's method to numerically solve the differential equation. We will use a loop to iterate i Show more…
Show all steps
Your feedback will help us improve your experience
Collin Parker and 92 other Calculus 3 educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Numerically Solve the Following: 1. Use Euler's Method: du/dt = v dv/dt = -kv - u^3 + B cos(t) u(0) = 1.0 v(0) = 1.0 k = 0.4 B = 20.0 h = 0.01 i = 10000 Write the data (y1, y2) to a file named "LASTNAME_Prob1.dat" Example: If your name is John Doe – file name would be "DOE_Prob1.dat" Plot the result with lines using GNUPLOT (Hint: see lecture 08) Submit full code (copy and paste). Plot must be on a separate page. Run the code again and plot the result for: k = 0.1 B = 11.0
Sri K.
Recommended Textbooks
Calculus: Early Transcendentals
Thomas Calculus
Watch the video solution with this free unlock.
EMAIL
PASSWORD