A set of 11 data points is given in the attached Excel spreadsheet: PS5_prob1_FD_data.xlsx.
Task: Perform numerical differentiation to approximate the second derivative of the
provided data. In doing so, address the following prompts:
1. Write your own MATLAB code to perform an appropriate Finite Difference (FD)
approximation for the second derivative at each point in the provided data. Note:
You are welcome to use the “lowest order” approximation of the second derivative f ′′(x).
a) “Read in” the data from the Excel spreadsheet using a built-in MATLAB com-
mand, such as xlsread, readmatrix, or readtable – see docs for more info.
b) Write your own MATLAB function to generally perform an FD approximation
of the second derivative for an (arbitrary) set of n data points. In doing so, use
a central difference formulation whenever possible.
c) Call your own FD function and apply it to the given data. Report out/display
the results.
2. Reflect on your results by comparing to the exact solution.
a) The tabulated data follows the trend of f (x) = e0.5x. Calculate the analytical
second derivative of f ′′(x) by hand. Note: This calculation is very short, as we
are just looking for the closed-form solution from calculus.
b) Based on your result from (a), add a couple of lines of code to calculate and re-
port out/display the “true error” (as a percentage) between your finite difference
approximation and the exact analytical result: etrue = approx.−exact
exact ×100%. Which
points have the largest magnitude of error? Why?
11 data points
xi e(x/2)
3.00 4.482
3.10 4.711
3.20 4.953
3.30 5.207
3.40 5.474
3.50 5.755
3.60 6.050
3.70 6.360
3.80 6.686
3.90 7.029
4.00 7.389
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- dataset in picture Use the given dataset to perform the following using python: Name of dataframe (your reg_no+your_name) Import the given data set Find out its header and information Calculate the mean, median and mode of covid_deaths, covid_recoveries, and covid_cases Find out the total of covid affected cases(all three cases) in all countries Find out the total of covid related deaths in all countries Countries covid_deaths covid_recoveries covid_cases Pakistan 10000 520000 55000 India 12000 120000 130000 Bangladesh 14000 123000 120000 Srilanka 19000 213000 45000 Bhutan 12000 212 44000 Nepal 1000 9000 12300 Australia 80000 560000 32100 Singapore 2000 130000 12345 England 100000 320000 89765 USA 100000 890000 87898arrow_forwardMake a list of the stages in the normalizing procedure.arrow_forwardfastfood.py -> using "sys.argv" ● Use the fastfood.csv file to complete the following assignment. Create a file, fastfood.py, that loads the .csv file and runs a regression predicting calories from total_fat, sat_fat, cholesterol, and sodium, in that order. Add a constant using sm.add_constant(data). ● Note: you will not need to upload the .csv to CodeGrade because I have pre-loaded it, but you will need to read in the data. ● Then, print the following to two decimals print(model.mse_total.round(2)) print(model.rsquared.round(2)) print(model.params.round(2)) print(model.pvalues.round(2))arrow_forward
- Task 1: The InstantRide received some traffic violation tickets from the government. The Legal team of InstantRide requires the travel information of the respective drivers along with corresponding Driving License IDs to proceed further. In addition, the team wants to include the drivers without travel information in the system yet for the completion of driver list. Therefore, you need to return DRIVER_FIRST_NAME, DRIVER_LAST_NAME, DRIVER_DRIVING_LICENSE_ID, TRAVEL_START_TIME, TRAVEL_END_TIME information from the DRIVERS and TRAVELS data connected by LEFT JOIN. Task: Query all drivers with and without travel data. (SQL Database Test)arrow_forward1. Write a PLSQL program using implicit cursor to update employee salary with 100 BD in employee table. (Note create a table employee, insert 5 records then apply this PLSQL code on it) (Marking scheme: for using implicit cursor concept, output) for table creation, for creating 5 rows in table, for writing update query, forarrow_forwardTable is necessaryarrow_forward
- QUESTION 1 Count the number of missing values for the variables Q1, Q2, Q3 and Q4 in the missing.txt data set. Add the number of missing values to each observation (use variable names MissQ1, MissQ2, MissQ3 and MissQ4). Use appropriate function to test for the missing values. Display the total missing values in your report as follows. [Hint: Use ARRAY & SAS function in the conditional statement] | missing.txt - Notepad File Edit Format View Help nurulhuda, 7,14,,11 rabiatul,8,11,10, farahhazwani,5,,13,10 adib, 10,,7,8 alinajwa,9,8,,12 zulaikha,8,,6,9 ameer, 7,9,10,6 afiq, 12,9,,13 Obs Name Q1 Q2 Q3 Q4 missQ1 missQ2 missQ3 missQ4 1 nurulhuda 7 14 11 1 2 rabiatul 8 11 10 1 3 farahhazwani 5 13 10 1 4 adib 10 7 8 1 5 alinajwa 9 8 12 1 6 zulaikha 8. 6 9 1 7 afiq 12 13 1 3 1 3. co 9.arrow_forward• Data Manipulation Language (DML): Develop the following SQL statements: o UPDATE statements to mark any previously unavailable products as "shipped" and any orders not previously completely shipped as "completely shipped" Be sure to provide a rationale for your approach to the SQL statements. All sources, both in-text and in the References section, should be cited using APA format. N N N Orders -order_id [PK] (int) - customer_id [FK) (int) - date (datetime) - shipment_status (varchar) Products -product_id [PK] (int) -name (varchar) - description (varchar) -price (decimal) -vendor_id (int) Vendors -vendor_id [PK] (int) -name (varchar) - email (varchar) -address (varchar) Purchase Details -purchase_details_id [PK] (int) -purchase_id [FK) (int) -product_id [FK] (int) -quantity (int) -price (decimal) N N N N Customers customer_id [PK] (int) - name (varchar) - email (varchar) - address (varchar) N N Order Details -order_details_id [PK] (int) -order_id [F] (int) -product_id [FK] (int)…arrow_forwardApply the INGRES algorithm (the detachment technique) to the following query: Select std_name,std_dpt FROM std_info,std_absence WHERE std_info.std_id%3Dstd_absence.std_id AND std_absence.abs_hrs > 1 AND std_absence.date = '2020-12-06'; std_info I std_id ! std_name ! std_dpt I std_avg ! 1 1 Ahmed 2 I Ali ! Information ! I Networks 75 1 80 : std_absence | std_id : std_name : date I abs_hrs I 1 ! Ahmed 2 I Ali 1 1 Ahmed | 2020-12-06 1 | 2020-12-06 I 2020-12-08 Iarrow_forward
- Language- C++arrow_forwardOnly need help with the excel file. The moving averages as well as the MADarrow_forwardbbhosted.cuny.edu/webapps/assessment/take/launch.jsp?course assessment_id=_1787700_1&course_ id3 1950256 1&content_id= 55349866 1&istep=Dnull ¥ Question Completion Status: Given a truth table below with the first two columns of truth values provided: b. f(p,a) 1 T 2 T 3 F 4 Which of the answers below contains the truth values for the third column when f(p,q) = (peq) →(q) ? Column 3 Column 3 truth values: Column 3 Column 3 truth values: Column 3 truth values truth truth values: values: 1 T 1 T 1 F 1 T None of the other 1 F O2 T O 2 F O answers provided is O 2 F 2 T correct. 2 T 3 F 3 T 3 F 3 T 3 F 4 T 4F 4 T 4 T 4 F Save All Answers Click Save and Submit to save and subnut. Chck Save All Answers to save all answers. Type here to search 6 66 F. F.arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY