102k views
4 votes
Write a linear system to find the coefficients c0, . . . , c5 that make this equality true. Use matlab to solve the resulting linear system. Write the resulting equality.

User Vasu
by
7.4k points

1 Answer

3 votes

Answer:

clc

clear all

close all

format long

f=@(n) sum((1:n).^4);

n=1:6;

A=[n(:).^5 n(:).^4 n(:).^3 n(:).^2 n(:) ones(numel(n),1)];

b=[f(1);f(2);f(3);f(4);f(5);f(6)];

C=A\b;

for i=5:-1:0

fprintf('c%d = %f\\',i,C(5-i+1))

end

Write a linear system to find the coefficients c0, . . . , c5 that make this equality-example-1
User Ariaby
by
6.9k points