Question

In: Mechanical Engineering

Plot the estimate of the derivative dy"dx from the following data. Do this by using forward, backward, and central differences. Compare the results.

Plot the estimate of the derivative dy"dx from the following data. Do this by using forward, backward, and central differences. Compare the results.

1 3 4 6 7 8 9. 10 y 7 9. 12 15 18 22 20 17 2. 2.

Solutions

Expert Solution

clear
clc
x=[0 1 2 3 4 5 6 7 8 9 10];
y=[0 2 5 7 9 12 15 18 22 20 17];
l=1;m=1;n=1;
for i=1:10
forward(l)=(y(i+1)-y(i))/(x(i+1)-x(i))
l=l+1;
end
for j=2:11
backward(m)=(y(j)-y(j-1))/(x(j)-x(j-1))
m=m+1;
end
for k=2:10
central(n)=(y(k+1)-y(k-1))/2
n=n+1;
end
x1=0:9;
plot(x1,forward,\'r\');
hold on
x2=1:10;
plot(x2,backward,\'g\')
hold on
x3=1:9;
plot(x3,central,\'b\')
grid on
legend(\'forward\',\'backward\',\'central\')  


Related Solutions

In each case, compute the derivative dy dx . Do not simplify your answer. a) y=...
In each case, compute the derivative dy dx . Do not simplify your answer. a) y= 4x^3e^5x b) y=ln {(x^3 + 3x)(2x^4 -1)} using product rule c) f (x) = x^4 ln 3x - 2/ e^2x d) y= ln(2x^3)/ (4x^2-1) Please show all work and label answers according to question number / letter
For each of the following mathematical functions (or equations): (i) Take the first derivative dy/dx, (ii)...
For each of the following mathematical functions (or equations): (i) Take the first derivative dy/dx, (ii) Set dy/dx = 0, then solve for x . (iii) Take the second derivative d(dy/dx)/dx. Is the second derivative positive or negative at x*? Is this a relative minimum point or a relative maximum point? Or neither? 1) Y= 1500 X – (41,000,000 + 500 X + .0005 X2) 2) Y= 12,100,000 + 800X + .004 X2 X 3) Y=(1800-.006X)X 4) Y=1800X-.006X -(12,100,000+800X+.004X )...
What's the difference between numerical method to calculate differential (backward, central, forward)? At what condition do...
What's the difference between numerical method to calculate differential (backward, central, forward)? At what condition do I have to use forward over central and backward, etc? If there's boundary condition that permits the complete use of central method, what will happen if I still use forward, backward, and central regardless there's boundary condition that permits the use of central method? note: I'm not used to describe pure mathematical problem in english, so I'm sorry if my question is hard to...
At a relative maximum of a curve y(x), the slope dy/dx is zero. Use the following data to estimate the values of x and y that co
At a relative maximum of a curve y(x), the slope dy/dx is zero. Use the following data to estimate the values of x and y that correspond to a maximum point.
The following data are results from a studying the effects of using four quarters or a...
The following data are results from a studying the effects of using four quarters or a $1 bill on keeping the money or spending it. 43 students were given the denominations. Purchased Gum Kept the Money Total Given Four Quarters 27 16 Given a $1 Bill 12 34 Total 43 (a) What are the two row totals? (b) What are the two column totals? (c) Find the probability (as a fraction and a decimal rounded to three places) of randomly...
Consider the following second-order ODE: (d^2 y)/(dx^2 )+2 dy/dx+2y=0 from x = 0 to x =...
Consider the following second-order ODE: (d^2 y)/(dx^2 )+2 dy/dx+2y=0 from x = 0 to x = 1.6 with y(0) = -1 and dy/dx(0) = 0.2. Solve with Euler’s explicit method using h = 0.4. Plot the x-y curve according to your solution.
Using Runge-Kutta method, compute y(0.3), from the equation dy dx = xy 1+x2 with y(0) =...
Using Runge-Kutta method, compute y(0.3), from the equation dy dx = xy 1+x2 with y(0) = 1, take h = 0.1
Construct the 99% interval estimate for the ratio of the population variances using the following results...
Construct the 99% interval estimate for the ratio of the population variances using the following results from two independently drawn samples from normally distributed populations. (Round "F" value and final answers to 2 decimal places. You may find it useful to reference the appropriate table: chi-square table or F table) Sample 1: x⎯⎯x¯ 1 = 165, s21s12 = 25.7, and n1 = 11 Sample 2: x⎯⎯x¯ 2 = 161.7, s22s22 = 22.1, and n2 = 10
Consider the following first-order ODE dy/dx=x^2/y from x = 0 to x = 2.4 with y(0)...
Consider the following first-order ODE dy/dx=x^2/y from x = 0 to x = 2.4 with y(0) = 2. (a) solving with Euler’s explicit method using h = 0.6 (b) solving with midpoint method using h = 0.6 (c) solving with classical fourth-order Runge-Kutta method using h = 0.6. Plot the x-y curve according to your solution for both (a) and (b).
The display provided from technology available below results from using data for a smartphone​ carrier's data...
The display provided from technology available below results from using data for a smartphone​ carrier's data speeds at airports to test the claim that they are from a population having a mean less than 5.00 Mbps. Conduct the hypothesis test using these results. Use a 0.05 significance level. Identify the null and alternative​ hypotheses, test​ statistic,P-value, and state the final conclusion that addresses the original claim.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT