CONVERSION OF ODE TO RECURRENCE RELATION
Afficher commentaires plus anciens
syms x k r f(x) g(x) a b beta b1 M L
syms F(k) G(k)
F(0)=0;F(1)=1;F(2)=a/2;G(0)=0;G(1)=1/2;G(2)=b/2;b1=1/beta;
%%%%dnf=diff(f,x,n)
f=F(k);g=G(k);d1f=(k+1)*F(k+1);d2f=(k+1)*(k+2)*F(k+2);d3f=(k+1)*(k+2)*(k+3)*F(k+3);d1g=(k+1)*G(k+1);
d2g=(k+1)*(k+2)*G(k+2);d3g=(k+1)*(k+2)*(k+3)*G(k+3);
f*d2f=sum((k-r+1)*(k-r+2)*F(r)*F(k-r+2),r,0,k);g*d2g=sum((k-r+1)*(k-r+2)*G(r)*G(k-r+2),r,0,k);
f*d2g=sum((k-r+1)*(k-r+2)*F(r)*G(k-r+2),r,0,k);g*d2f=sum((k-r+1)*(k-r+2)*G(r)*F(k-r+2),r,0,k);
(d1f)^2=sum((k-r+1)*(r+1)*F(r+1)*F(k-r+1),r,0,k);(d1g)^2=sum((k-r+1)*(r+1)*G(r+1)*G(k-r+1),r,0,k);
eqns=simplify((1+b1)*d3f-(d1f)^2+f*d2f+g*d2f-(M+L)*d1f==0,(1+b1)*d3g-(d1g)^2+f*d2g+g*d2g-(M+L)*d1g==0)
Rsolve(eqns,{F(k+3),G(k+2)});
%% I want a recurrence relation in terms of F(k+3) and G(k+2) (k = 0 -> Inf) but unable to code it properly
1 commentaire
Réponses (0)
Catégories
En savoir plus sur Symbolic Math Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!