Question: Lab 3 problem Q 1 : Use the code snippets above, plot the function y ( t ) = e - t s i n

Lab 3 problem
Q1: Use the code snippets above, plot the function y(t)=e-tsin(t), its derivative w(t)=y'=-e-tsin(t)+e-tcos(t) on the same plot from 1t10. Try with both a step of h=1 and h=0.1 to notice the difference, although the example graph below is just the h=0.1 case.
Q2. Then, use finite difference to approximate y', you can use the code snippet above using a for loop or vectorization. Plot with the step size h to be 1 and 0.1 in two plots.
Please answer with codes
Lab 3 problem Q 1 : Use the code snippets above,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!