higher order polynomial expression

3 views (last 30 days)
Hirenkumar Tailor
Hirenkumar Tailor on 18 May 2020
Commented: Hirenkumar Tailor on 18 May 2020
I want to implement matlab code for set of 11 polynomials expression and upto 3rd order derivatives. I want to solve this equation with intergration of all 11 set of polynomials. eg. K = intergration with limit 0 to 1 (ai(x) bj(x) dx), where i = 0 and j = 0 to 11
I have created this:
%Some Polynomials defined over the interval[0,1]
i want this as ai(x) and i = 0 means N0 should be selected
N0 = [0 0 0 0 0 0 0 0 0 0 1 -1 0];
N1 = [0 0 0 0 0 0 0 0 0 1 -1 0 0];
N2 = [0 0 0 0 0 0 0 0 1 -1 -1 1 0];
N3 = [0 0 0 0 0 0 0 1 -1 -3 0 3 0];
N4 = [0 0 0 0 0 0 1 -1 -6 6 3 -3 0];
N5 = [0 0 0 0 0 1 -1 -10 10 15 -15 0 0];
N6 = [0 0 0 0 1 -1 -15 15 45 -45 -15 15 0];
N7 = [0 0 0 1 -1 -21 21 105 -105 -105 105 0 0];
N8 = [0 0 1 -1 -28 28 210 -210 -420 420 105 -105 0];
N9 = [1 -10 -36 36 378 -378 -1260 1260 1260 945 -945 0 0];
N10 = [1 -1 -45 45 630 -630 -3150 3150 4725 -4725 -945 945 0];
%1st order
for bj(x) this 1st order should be selected in an integration. and j = 0 to 11 means N01 to N101
N01= polyder (N0)
N11= polyder (N1);
N21= polyder (N2);
N31= polyder (N3);
N41= polyder (N4);
N51= polyder (N5);
N61= polyder (N6);
N71= polyder (N7);
N81= polyder (N8);
N91= polyder (N9);
N101= polyder (N10);
in above first order size of row vector is also changes
please help me with this code.
Thank you in advance!
  4 Comments
Hirenkumar Tailor
Hirenkumar Tailor on 18 May 2020
John D'Errico sir, can you give me sample or example of cell array for polynomials? And if i will take derivation of that polynomials, size of row vector is reduced, how to keep it same? Yes it was spelling mistake, but how to take integration of those cell arrays?
I have gone through convolution for polynomials and also read about polyint which supports only two variables, Here I have 11 polynomials.
Please help me with code.
Hirenkumar Tailor
Hirenkumar Tailor on 18 May 2020
Thanks John D'Errico sir
I have modified my code as this:
N = {[0 0 0 0 0 0 0 0 0 0 1 -1 0], [0 0 0 0 0 0 0 0 0 1 -1 0 0], [0 0 0 0 0 0 0 0 1 -1 -1 1 0], [0 0 0 0 0 0 0 1 -1 -3 0 3 0], [0 0 0 0 0 0 1 -1 -6 6 3 -3 0], [0 0 0 0 0 1 -1 -10 10 15 -15 0 0], [0 0 0 0 1 -1 -15 15 45 -45 -15 15 0], [0 0 0 1 -1 -21 21 105 -105 -105 105 0 0], [0 0 1 -1 -28 28 210 -210 -420 420 105 -105 0], [1 -10 -36 36 378 -378 -1260 1260 1260 945 -945 0 0], [1 -1 -45 45 630 -630 -3150 3150 4725 -4725 -945 945 0]}
for i=1:11
N1(i) = { polyder(N{1,i}) }
end
for j=1:11
N2(j) = { polyder(N1{1,j}) }
end
for k=1:11
N3(k) = { polyder(N2{1,k}) }
end
now problem is, if I derivate N, then N1, N2, N3 does not produce same size of vector, i.e 1x13. How to do that? and also put some more light on integration of all this polynomials.

Sign in to comment.

Answers (0)

Categories

Find more on Polynomials in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!