2 views (last 30 days)

syms k r

a=sym('a'); b = sym('b');L=sym('L'); M = sym('M'); b1 = sym('b1');

m=7; F = sym(zeros(m,1)); F(1)=0; F(2)=1; F(3)=a;

G = sym(zeros(m,1)); G(1)=0; G(2)=1/2; G(3)=b;

for k=1:7

for r = 1:k

F3 = F(1)+ F(2)+F(3); G3 = G(1)+G(2)+G(3);

F(k+3)= ( F3+sum((r+1)*F(r+1)*(k-r+1)*F(k-r+1)) - sum((k-r+1)*(k-r+2)*F(k-r+1)*(F(r)+G(r)))+ (M+L)*(k)*F(k+1))/((1+b1)*(k+1)*(k+2)*(k));

G(k+3) = (G3+ sum((r+1)*G(r+1)*(k-r+1)*G(k-r+1)) - sum((k-r+1)*(k-r+2)*G(k-r+2)*(F(r)+G(r))) + (M+L)*(k)*G(k+1))/((1+b1)*(k+1)*(k+2)*(k));

end

end

% %%%%%

for N=1:6

disp(F(N))

disp(G(N))

end

f=sum(x^k*F(k),k,0,7)

g=sum(x^k*G(k),k,0,7)

%%%%%%%

Any reply will be greatly appreciated

After getting F(N) and G(N), I neeed to find then f and g

Opportunities for recent engineering grads.

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

Start Hunting!
## 8 Comments

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785440

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785440

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785595

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785595

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785617

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785617

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785649

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785649

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785774

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785774

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785823

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785823

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785852

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_785852

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_786008

⋮## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/499982-my-answer-is-not-matching-with-attached-file#comment_786008

Sign in to comment.