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 on coursehero.com
"""
**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
Please write legibly. Thank You and God Bless.
Please See Attached photo
Find the Fourier Series to represent a function of the given problem:
arrow_forward
SOLVE AND ILLUSTRATE
arrow_forward
Arrow and node diagram
arrow_forward
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
Solve Handwriting i requested to u. With Diagram
arrow_forward
Please arrange the data in a table
arrow_forward
pls help! write the complete solutios and legibly. UPVOTE will be given!
Engineering Mechanics
The answers should be: Fab= 449N, Fac= 861N, Fad = 449N
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
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
8 + (230 x 10^-3) compute the following, express answer in engineering notation
arrow_forward
Computation must be completeAnswer in two decimal places. Box the final answer
arrow_forward
Use the method of virtual work, for example, virtual integration, and principle of superposition, handwritten work only don't forget FBDs and ensure neatness pls.
arrow_forward
Solve it in writen form . dont upload pictures
arrow_forward
Show computations only for letter d.
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
Solve it and provide diagram
arrow_forward
i need all parts of question on the right hand corner solve I STATED FILL IN THE BLANKS.
arrow_forward
for question(b),could u pls write it more clearly?\
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
Please help me complete both. The graph is just an example
arrow_forward
What vector is generated by the following
statement?x=linspace(0, 1, 5)
0, 0.2, 0.4, 0.6, 0.8 O
0, 0.25, 0.5, 0.75, 1 O
1, 2, 3, 4, 5
O
0, 1, 2, 3, 4
O
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
Use virtual work method. Do not round off your computations.
arrow_forward
Pls answer in this format
Identify the problem (with diagram)
complete tabulation
computations/solution
final diagram with computed unknown variables
arrow_forward
please use stored values(complete) on decimals
arrow_forward
X= 256
B= 5
arrow_forward
Please compute for letter a and letter b
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
- pls help! write the complete solutios and legibly. UPVOTE will be given! Engineering Mechanics The answers should be: Fab= 449N, Fac= 861N, Fad = 449Narrow_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_forwardQ4: 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_forward
- 8 + (230 x 10^-3) compute the following, express answer in engineering notationarrow_forwardComputation must be completeAnswer in two decimal places. Box the final answerarrow_forwardUse the method of virtual work, for example, virtual integration, and principle of superposition, handwritten work only don't forget FBDs and ensure neatness pls.arrow_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