Question Details
[answered] MMAE 350 - Review Problems Problem #1 t y t 0.60 - 0.97 (a)
I need help completing this document to study for upcoming final.?
MMAE 350 ? Review Problems
Problem #1 t
y t 0.45
1.46 0.60
2.35 1.00
0.45 1.60
- 0.72 2.20
0.97 (a) Using the data in the above table, write down the MATLAB statements needed to
compute (i) the first derivative
, and (ii) the second derivative
using the built-in
2
dy
d y
dt
dt2
MATLAB command ?diff?. (b) Derive the equations for the coefficients C1, C2 , and C3 , in the equation y C1 f1 x C2 f2 x C3 f3 x
that best fits a given set of data points xi , yi . Recall that this is called i 1,2, 3,?,n the least-squares method. The first step is to write down the expression for the ?squared error?.
The second step is to write down the necessary conditions to minimize the
?squared error?, which is a function of three variables; C1 , C2 , and C3 . The third step is to rearrange the equations so they can be solved for C1, C2 , and C3 . (c) Write down the MATLAB commands needed to interpolate the value of the dependent
variable at
using a cubic spline and the built-in MATLAB function y ?interp1?. x 4.57 x
y 1.39
6300 2.39
6375 3.93
6525 5.40
6600 Problem #2
The following boundary value problem is to be solved using the MATLAB
function?bvp4c?. The independent variable is and the dependent variable is r u r . u r1 9
d2u 1 du
35 6u 2
dr
r dr
r 1 r 2 2 du u r2 26 dr r2 (a) Transform the above second order ODE and boundary conditions into a system of first
order ODEs and boundary conditions.
(b) Write the MATLAB function m-file for the system of first order ODEs.
(c) Write the MATLAB function m-file for the boundary conditions.
(d) Write the MATLAB script m-file to solve the BVP using ?bvp4c?.
(e) Run the problem on MATLAB and plot for
. Write down the
1 r 2
du
vs. r
dr
MATLAB statements you used to do this. To check your results, compare them with the
plot given below.
0 du/dr ?5 ?10 ?15 1 1.1 1.2 1.3 1.4 1.5 r 1.6 1.7 1.8 1.9 2 Problem #3
(a) Construct an integration formula in the following form:
h I f f x dx c1 f h c2 f 0 c3 f h
h Derive the coefficients c1 , c2 , and c3 by making the integration rule exact when f x 1, x, and x2 . (b) Three-point Gauss quadrature for estimating 1 I f f x dx is given by: 1 I f f x dx C1 f x1 C2 f x2 C3 f x3 1 1 where . 5
8
5
3
3
C1 , C2 , C3 , x1 , x2 0, and x3 9
9
9
5
5
Explain in words how the six constants,
system of equations that C1, C2 , C3 , x1, x2 , and x3 , are derived. Include the C1 , C2 , C3 , x1, x2 , and x3 must satisfy (do not solve them). See pages 356-357 of the text, and/or ?Gauss Quadrature? on Blackboard.
The documents say that in order to determine the unknowns C1, C2, C3, x1, x2, and
x3, you make the integration formula exact when f(x) = 1, x, x2, x3, x4, and x5. From
that statement you can write out the six nonlinear equations for the six unknowns
C1, C2, C3, x1, x2, and x3. The solution of this system of equations (which you don't
have to do) is how the coefficients are derived.
(c) Review the MATLAB commands ?trapz? and ?integral?. Then complete the
following statement:
The _____________ command is used to integrate tabulated data, while the
_____________ command is used to integrate functions.
(d) In MATLAB, use the built-in function ?trapz? to integrate the function
over the interval
. Write the statements below.
f x 8 4.5(sinh x x4 ) 2,2 >> __________________________________________________
>> __________________________________________________ Problem #4
For the system of second order differential equations:
2 2 dx dy
d2 x 0.3 510x 0.3 100y 50
2
dt dt dt 2 2 dy dx
d2 y 0.86 28.6 y 0.86 28.6x 0
2
dt dt dt with zero initial conditions, i.e., x 0 0 dx 0 0 y 0 0
dt dy 0 0
dt (a) Transform the above into a system of first order differential equations, including the
initial conditions.
(b) Write down the statements for the function m-file for this problem.
(c) Obtain the numerical solution using ?ode45? and plot vs. . The time interval
y
dy
dt
is 0 to 2 seconds. Write down the MATLAB statements you used to do this. To check
your results, compare them with the plot given below. 1.5 1 dydt 0.5 0 ?0.5 ?1
?0.05 0 0.05 0.1 0.15 y 0.2 0.25 0.3 0.35 0.4 Problem #5 (This problem is very similar to Problem 11.10) Consider the following boundary value problem (BVP): 3y 0 dy 0 6
dx d2 y 3y x
dx2 0 x 1 y 1 1
(a) Discretize the BVP using finite difference formulas for the derivatives that have
truncation error
. Assume the interval
is divided into 5 equal parts. Use O h2 0 x 1 the table of finite difference formulas on the next page.
(b) Put the equations from part (a) in matrix form.
(c) Obtain the numerical solution of the system of equations from part (b) using left
division and plot
. Write down the MATLAB statements you used to do this. To y vs. x check your results, compare them with the plot given below. 5
finite difference solution 4.5 4 y 3.5 3 2.5 2 1.5 1 0 0.1 0.2 0.3 0.4 0.5 x 0.6 0.7 0.8 0.9 1 FINITE DIFFERENCE FORMULAS
First Derivative
Method
Two-point forward
difference
Three-point forward
difference
Two-point backward
difference
Three-point
backward difference
Two-point central
difference Formula f xi f xi 1 f xi h 3 f xi 4 f xi 1 f xi 2 2h
f xi f xi 1 f xi h
f xi 2 4 f xi 1 3 f xi f xi 2h
f xi 1 f xi 1 f xi 2h
f xi Truncation
Error O h O h2 O h O h2 O h2 Second Derivative
Method
Three-point forward
difference
Three-point
backward difference
Three-point central
difference
Four-point forward
difference
Four-point backward
difference Formula f xi 2 f xi1 f xi2 h2
f xi 2 2 f xi 1 f xi f xi h2
f xi 1 2 f xi f xi 1 f xi h2
2 f xi 5 f xi1 4 f xi2 f xi3 f xi h2 f xi3 4 f xi2 5 f xi1 2 f xi f xi h2
f xi Truncation
Error O h
O h O h2 O h2 O h2 Problem 6
You are given the following MATLAB code:
function [dudt] = Example(t,u)
dudt = [u(2);?(5/2)*u(1)?(0.5/2)*u(2)+(1/2)*12*sin(7*t)];
Multiple-choice question
Circle the correct answer.
This is a
(a) script file that defines a function
(b) built-in function
(c) user-defined function
(d) (a) and (b)
(e) (a) and (c)
Complete the following statements:
(a) The name of this function is _____________________________________________.
(b) The input arguments are ________________________________________________.
(c) The output arguments are _______________________________________________.
(d) The independent variables are ___________________________________________.
(e) The dependent variables are _____________________________________________. Questions on input and output arguments
(1) Describe the input arguments, i.e., are they scalars? vectors? matrices? If the input
arguments are vectors and/or matrices, give their dimensions (number of rows and
number of columns). (2) Describe the output arguments, i.e., are they scalars? vectors? matrices? If the output
arguments are vectors and/or matrices, give their dimensions (number of rows and
number of columns). Questions on the system of ODEs
(1) In terms of , what system of first order ODEs does this MATLAB
du
dv
u,
, v, and
dt
dt
function represent? Use the information given in the table.
Table of Notation
OD
E x
dx
dt x, and
(2) In terms of
represent? System of
ODEs
du
u
dt
dv
v
dt MATLAB ODEs
u(1
) dudt(1
) u(2
) dudt(2
) dx
dt , what second order ODE does this system of first order ODEs Questions about ?ode45?
Given the following MATLAB code:
function [dudt] = Example(t,u)
dudt = [u(2);?(5/2)*u(1)?(0.5/2)*u(2)+(1/2)*12*sin(7*t)]; Write down the MATLAB statements needed for solving this system of ODEs
using ?ode45?if the solution is to be computed from
until
with t 0 zero initial conditions.
Write down the MATLAB statements needed for plotting t 20 v vs. u . v u
Solution details:
Answered
QUALITY
Approved
ANSWER RATING
This question was answered on: Sep 18, 2020
Solution~0001013946.zip (25.37 KB)
This attachment is locked
We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy from our tutoring website www.aceyourhomework.com (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card . All your purchases are securely protected by .
About this Question
STATUSAnswered
QUALITYApproved
DATE ANSWEREDSep 18, 2020
EXPERTTutor
ANSWER RATING
GET INSTANT HELP/h4>
We have top-notch tutors who can do your essay/homework for you at a reasonable cost and then you can simply use that essay as a template to build your own arguments.
You can also use these solutions:
- As a reference for in-depth understanding of the subject.
- As a source of ideas / reasoning for your own research (if properly referenced)
- For editing and paraphrasing (check your institution's definition of plagiarism and recommended paraphrase).
NEW ASSIGNMENT HELP?
Order New Solution. Quick Turnaround
Click on the button below in order to Order for a New, Original and High-Quality Essay Solutions. New orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.
WE GUARANTEE, THAT YOUR PAPER WILL BE WRITTEN FROM SCRATCH AND WITHIN YOUR SET DEADLINE.
