Calculate the derivative of the function by hand

Assignment Help MATLAB Programming
Reference no: EM131307001

1) Calculate the following for the function f (x) = e-3x - 2x

a. Calculate the derivative of the function by hand. Write a MATLAB function that calculates the derivative of this function and calculate the derivative at x = 0.5.

b. Develop an M- to evaluate the centered finite-difference approximations, at x = 0.5. Assume that dx = 0.1.

c. Repeat part (b) for the second-order forward and backward differences. Again Assume that dx = 0.1.

d. Using the results obtained in parts b and c, calculate the percentage error between the actual value and the the results of (b) and (c).

Use the following formulas:

Centered diff. df/dx=(f(i+1)-f(i-1))/2dx
Fwd. diff. df/dx=(-f(i+2)+4f(i+1)-3f(i))/2dx
Bkwd. diff. df/dx=(3f(i)-4f(i-1)+f(i-2))/2dx

2) a) Use the three-point Gauss-Legendre formula to evaluate the following function between 0 and 0.8

f (x) = 3x + 5x2

Remember that you have to make a change of variable to make the integration between -1 and 1. Do all your calculations in MAMAS.

b) Calculate the value of the integral using a MATLAB built in function of your choosing.

2234_Gauss-Legendre Formula.jpg

3) Use any Matlab built-in function to solve the following differential equation in the range oft = 0 to 10 and plot the solution.

y' = 4e0.8t - 5y, y(0) = 2.

Reference no: EM131307001

Questions Cloud

What would be the annual premium : Find the cost of a $95,000 endowment policy that has a 10-year term for a 57-year-old woman.- What would be the annual premium for a $150,000 endowment policy for 7 years for a 68-year-old man?
How much will the annual premium be : Suppose that Blake wants to pay his premium annually during the policy term. How much will the annual premium be?
How much will each annual premium be : If Sandra changes her mind toward having the premium paid in only six annual payments, how much will each annual premium be?
Process is proven capable before developing statistical : Why is it important to prove that a process is proven capable before developing statistical control limits (i.e., SPC charts)?
Calculate the derivative of the function by hand : Calculate the derivative of the function by hand. Write a MATLAB function that calculates the derivative of this function and calculate the derivative at x = 0.5.
Determine the deflection of the neutral axis : The second moment of area of the cross-section of the beam is 4I1 for segment AB and I1 for the remainder of the beam. Determine the deflection w(x) of the neutral axis.
Prepare comprehensive financial plan : The comprehensive Financial Plan is to be done in groups of 4 students. Specific recommendations must include the areas of Asset Management, Property Ownership, Taxation, Cash Flow, Retirement Planning, Risk Management and Estate Planning.
Formula for determining the future value of a single sum : What is the formula for determining the future value of a single sum when using the future value interest factor table?
Write the stress tensors at points aand b : For the allen wrench of Problem 7.15, what is the deflection of the tip of the wrench when the maximum load of 60 N is applied, just before the bolt loosens?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd