For x 1 the following function can be computed by summing th

For x -1, the following function can be computed by summing the series expansion, f (x) = x/(1 - x)^2 = sigma^infinity_i = 1 I x^I approximately equal sigma^N_i = 1 ix^j For a given x and integer N write the complete Matlab program that first asks the user for the value x and integer N, and computes the approximate value for the function f(x) by summing N numbers using a \"for\" loop. If the following numbers are input into your program, What is the value computed from your program? Answer = (use format long!!)

Solution

Part a) Please find attached the programme. I understand this is a help centre but try and develop the codes youself lest you want to get a better understandiing. copy and paste this code in your matlab programme.

Matlab Code

clc
clear all;
format long;
i=0;
sum=0;
Prompt = \'What is the value of x ?\'
x=input(Prompt)
Prompt1 = \'What is the value of N ?\'
N=input(Prompt1)

for i = 1:N
sum = (i*x^i + sum);
  
end
sum

Part b ) 1.875

 For x -1, the following function can be computed by summing the series expansion, f (x) = x/(1 - x)^2 = sigma^infinity_i = 1 I x^I approximately equal sigma^N_

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site