Lab_5_Interpolation_and_RootFinding
.py
keyboard_arrow_up
School
University of Texas, Rio Grande Valley *
*We aren’t endorsed by this school
Course
2350
Subject
Civil Engineering
Date
Apr 3, 2024
Type
py
Pages
2
Uploaded by suckmyassbuddy
"""
**CIVE 2350: Numerical Methods for Civil Engineers** **Lab 5: Interpolation and Root Finding**
"""
#%%
# Add imports here
# %%
x = [0, 1, 3, 4, 10]
y = [2, 6, 4, 8, 3]
def task_1():
"""
Create a linear interpolation and reurn its value at x=2.5
"""
pass
task_1()
# %%
def task_2():
"""
Create a cubic spline interpolation and reurn its value at x=2.5
"""
pass
task_2()
# %%
def task_3():
"""
Create a lagrangian interpolation and reurn its value at x=2.5
"""
pass
task_3()
# %%
def task_4():
"""
Plot the linear, cubic spline, and lagrangian polynomial interpolations
in one plot
"""
pass
task_4()
# %%
f = lambda x: 2*x**2 -10
df = lambda x: 4*x
def task_5():
"""
Write a function to get the roots of f using the bisection method
"""
pass
task_5()
# %%
def task_6():
"""
Write a function to get the roots of f using the bisection method
"""
pass
task_6()
# %%
def task_7():
"""
return the root using scipy.optimize.root and confirm your answers in
the previous two tasls
"""
pass
task_7()
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Q/Write the following complex numbers in
form x+yi :
1) 3e^t/3 i
2) 2e^-Tt/4 i
3) e^t/3 e^-T/6 i
4) -5 e^ -7/5 T
arrow_forward
Please find the centroid and Ixx for the following shapes. Show all work with neat handwriting and step by step solutions.
arrow_forward
For situation 3, the plastic section modulus, Zx of the section is closest to:
a.2561 x 10^3 mm^3
b.5482 x 10^3 mm^3
c.6543 x 10^3 mm^3
d.7980 x 10^3 mm^3
arrow_forward
Q4: What is the
advantages of using
the script file for writing programs in
MATLAB:
O ease of error correction
O It can be saved
O All of the given
O can be opened many times
can be edited easily
arrow_forward
Q/Write the following complex numbers in
form x+yi :
3e^t/3 i
2e^-T/4 i
e^t/3 e^-T/6 i
-5 e^ -7/5 Tt
arrow_forward
Week 13 Linear Equation of Order One
Name:
3. (y-cos² x)dx + cosxdy = 0
arrow_forward
8 + (230 x 10^-3) compute the following, express answer in engineering notation
arrow_forward
What matrix is this?
Scalar even odd or identity
arrow_forward
i need all parts of question on the right hand corner solve I STATED FILL IN THE BLANKS.
arrow_forward
Note: Kindly provide a solution pls. The answer is already provided. Thank you!
1.3 A circle (radius = 14 cm.) is inscribed in a 10-sided regular polygon. What is the area(cm^2) of the regular polygon that is outside of the circle?
Ans: 21.09
arrow_forward
Answer A only by Virtual Work Method with full details
clear hand writing
arrow_forward
A moodle.unizwa.edu.om
The cross-sectional dimensions of
the T-beam is shown in figure
below. To Determine the location of
centroid (x,y); tick any correct
sentences from the following:
Given Data:
a = 25 mm
b = 250 mm
c = 50 mm
d = 150 mm
arrow_forward
Mohr's circle(with full details). in addition to neat handwriting or electronic writing.
PLZ, do not copy the answer because it is not complete and it has some errors.
arrow_forward
Do not give answer in image and hand writing
arrow_forward
Q3: Write C++ program to generate n times of x and produce the following
output report.
X
1
2
.
n
(x + x)
(x*x) (x*x*x)
Total
99
999 9999
Note: Comments makes the program more clear and understood.
arrow_forward
Determine the centroid x and y
arrow_forward
COMPLETE SOLUTION WITH FIGURES. BOX YOUR FINAL ANSWERUSE 3 DECIMAL PLACES IN EVERY SOLVED VALUES
arrow_forward
Please calculate the centroid x and y bar, for the following shapes. Show all work with neat handwriting witht the correct answer.
arrow_forward
Please calculate the centroid x and y bar, and Ixx for the following shapes. Show all work with neat handwriting witht the correct answer.
arrow_forward
Dimensioning methods in design datum are:
a)Incremental annd coordinate dimensioning
b)Incremental and absolute dimensioning
c)Chain and absolute dimensioning
d)Chain and coordinate dimensioning
arrow_forward
SKETCH THE FIGURE AND SHOW THE COMPLETE SOLUTIONS
arrow_forward
What are the type of the following bits?
arrow_forward
Please urgent
arrow_forward
Find the D10,D30 & D60 from the given graph,where the blue line represents the cumulative distribution while X-axis dimensions are in logarithmic scale.
arrow_forward
Part B: (define (tail x) ..) to obtain tail element of list x
Examples
> (tail (a))
'a
> (tail '(a b))
> (tail '(a b c)) 'c
'b
arrow_forward
I need help with Problem 14.6 in the first picture. Table 14.1 is the second picture.
arrow_forward
As an engineer in a construction company, you must design a steel compression member with
an effective length of 5 m loaded eccentrically at e = 200 mm, as shown in Figure 2. Due to
financial constraints, you need to choose one of the wide-flange shapes according to the
properties of rolled-steel shapes as listed in Appendix 1. Use E = 200 GPa and oy = 250 MPa.
200 mm
Figure 2
In your design proposal, clearly state the following:
i)
Evaluate the wide flange steel column that you are selected according to the American
Institute of Steel Corporation (AISC) column design standard.
Determine the largest load that it can safely support using the allowable stress
method.
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Engineering Fundamentals: An Introduction to Engi...
Civil Engineering
ISBN:9781305084766
Author:Saeed Moaveni
Publisher:Cengage Learning
Related Questions
- Q/Write the following complex numbers in form x+yi : 1) 3e^t/3 i 2) 2e^-Tt/4 i 3) e^t/3 e^-T/6 i 4) -5 e^ -7/5 Tarrow_forwardPlease find the centroid and Ixx for the following shapes. Show all work with neat handwriting and step by step solutions.arrow_forwardFor situation 3, the plastic section modulus, Zx of the section is closest to: a.2561 x 10^3 mm^3 b.5482 x 10^3 mm^3 c.6543 x 10^3 mm^3 d.7980 x 10^3 mm^3arrow_forward
- Q4: What is the advantages of using the script file for writing programs in MATLAB: O ease of error correction O It can be saved O All of the given O can be opened many times can be edited easilyarrow_forwardQ/Write the following complex numbers in form x+yi : 3e^t/3 i 2e^-T/4 i e^t/3 e^-T/6 i -5 e^ -7/5 Ttarrow_forwardWeek 13 Linear Equation of Order One Name: 3. (y-cos² x)dx + cosxdy = 0arrow_forward
- Note: Kindly provide a solution pls. The answer is already provided. Thank you! 1.3 A circle (radius = 14 cm.) is inscribed in a 10-sided regular polygon. What is the area(cm^2) of the regular polygon that is outside of the circle? Ans: 21.09arrow_forwardAnswer A only by Virtual Work Method with full details clear hand writingarrow_forwardA moodle.unizwa.edu.om The cross-sectional dimensions of the T-beam is shown in figure below. To Determine the location of centroid (x,y); tick any correct sentences from the following: Given Data: a = 25 mm b = 250 mm c = 50 mm d = 150 mmarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Engineering Fundamentals: An Introduction to Engi...Civil EngineeringISBN:9781305084766Author:Saeed MoaveniPublisher:Cengage Learning
Engineering Fundamentals: An Introduction to Engi...
Civil Engineering
ISBN:9781305084766
Author:Saeed Moaveni
Publisher:Cengage Learning