- Premium Academic Help From Professionals
- +1 301 710 0002
- support@usaelitewriters.com

muddiest point

Reflect on the readings and activities for this module. Your task for this assignment is to pose ONE question or point of confusion about the concepts we are learning about in this module. What are you still confused about? What did you not completely understand? What do you want to know more about?Your question should be specific and clear (for example, avoid general statements such as “I didn’t really understand the readings.”).After posting your question, check back throughout the week to see your instructor’s response. Your instructor will answer your question and pose a follow-up question back to you. You earn points for your initial question as well as your response to the instructor’s follow-up question.While you should not answer any of the questions posted by your classmates (or the instructor’s follow-up questions to each classmate), you should read through their questions and the instructor’s response to gain a better understanding of course material.

UCB Math 128A, Fall 2020: Programming Assignment 3

Due Friday November 20

In this assignment, we will study the evolution of a double pendulum. The state of the conguration

at any time t is given by the angles 1(t) and 2(t), see gure below.

q1

q2

The MATLAB utility pendplot.m on the course webpage can be used to visualize the double pendu-

lum in any conguration. Here is an example of how to use it, to animate the motion 1(t) = 2 sin t,

2(t) = sin(2t):

t = 0:0.02:10; th1 = 2*sin(t); th2 = sin(2*t); pendplot(th1, th2);

This motion was of course just made up and does not correspond to a true, physical motion. Now

we will solve for the actual evolution of the pendulum for various initial conditions!

- Assuming that the lengths of the bars are 1, the masses at the end of the bars are 1, and that

the constant of gravity is 1, the equations of motion for the double pendulum can be written:

00

1 =

3 sin 1 sin(1 22) 2 sin(1 2) (02

2 + 02

1 cos(1 2))

3 cos(21 22)

(1)

00

2 =

2 sin(1 2)(202

1 + 2 cos 1 + 02

2 cos(1 2))

3 cos(21 22)

(2)

Rewrite (1),(2) into a system of 1st order equations by introducing the angular velocities !1 =

01

and !2 = 02

. The current state of the pendulum can then be described by the vector

y = (1; 2; !1; !2), and the 1st order system can be written as y_ = f(y). Write a MATLAB

function fpend.m of the form

function ydot = fpend(y)

which evaluates f(y).

Your report should contain the 1st order system of equations and your MATLAB function

fpend.m.

Turn page !

1 - Implement a fourth-order Runge-Kutta method that integrates the system y_ = f(y) from t = 0

to t = 100 with stepsize h = 0:05. Use the four initial conditions described in the table below.

You can use the pendplot function to animate the motion of the pendulum, which might be

fun and might help you debug your code. But you do not need to include these plots in your

report.

Case 1(0) 2(0) !1(0) !2(0)

1 1 1 0 0

2 0 0 10 10

3 2 2 0 0

4 2 2 + 10 3 0 0

For each case, plot the function 2(t) versus time. Cases 3 and 4 demonstrate the initial value

sensitivity of the system, namely, that a small perturbation can lead to drastically dierent

solutions.

Your report should contain the MATLAB commands required to produce the results, and the

four plots of 2(t). - Run Case 1 in problem 2 with the ve stepsizes h = 0_05=2(k 1), k = 1; 2; 3; 4, and h = 0:001.

Compute the value of 2(t = 100) for each stepsize. Consider the last result the exact solution,

and plot the four errors as a function of h in a loglog-plot. Estimate the order of convergence

from the slope.

Your report should contain the MATLAB commands used, the ve values of 2(t = 100), the

loglog-plot, and the estimated slope.

2

Are you busy and do not have time to handle your assignment? Are you scared that your paper will not make the grade? Do you have responsibilities that may hinder you from turning in your assignment on time? Are you tired and can barely handle your assignment? Are your grades inconsistent?

Whichever your reason may is, it is valid! You can get professional academic help from our service at affordable rates. We have a team of professional academic writers who can handle all your assignments.

Our essay writers are graduates with diplomas, bachelor, masters, Ph.D., and doctorate degrees in various subjects. The minimum requirement to be an essay writer with our essay writing service is to have a college diploma. When assigning your order, we match the paper subject with the area of specialization of the writer.

- Plagiarism free papers
- Timely delivery
- Any deadline
- Skilled, Experienced Native English Writers
- Subject-relevant academic writer
- Adherence to paper instructions
- Ability to tackle bulk assignments
- Reasonable prices
- 24/7 Customer Support
- Get superb grades consistently

PLACE THIS ORDER OR A SIMILAR ORDER WITH USA ELITE WRITERS TODAY AND GET AN AMAZING DISCOUNT