## rsolve for recursive equation...

HI MaplePrimes,

The input -

rsolve(f(n)=f(n-1)+10*f(n-2),f(k))

returns a large expression.

My had calculations reduce this to

f(k) = [(41-19*sqrt(41))/820]*[((1-sqrt(41))/2)^k+((1+sqrt(41))/2)^k)].

There may be an error.

We let f(1)=1 and f(2)=2.

The sequence, starting with 1 should read -

1,2,12,32,152,472,...

What is the correct expression for f(k)?

Regards,

Matt

## where do I find the source code for simplified rso...

HI Maple primes.  We try to make sense of 'rsolve' in the Maple world.  What is command for source code?

Regards,

Matt

## what does 'rsolve', the Maple command do?...

Hi Mapleprimes,

We know that '' rsolve '' is a recurrence equation solver.  It is more than an expression simplifier.

Congratulations to the Maple computer algebra team for creating such a great computer tool.  simply want to know more.

rsolve_on_May_16_2017.pdf

Surely there are many steps to determine the values to place.

Regards,

Matt

## Convert series to function...

Good day everyone,

I'm trying to convert a series solution back to its original function but its given me "Error, (in rsolve/linindex) invalid subscript selector".

Attached is the series below

theta := convert(a-(1/2)*beta*a^2*y^2+(1/12)*beta^2*a^3*y^4-(1/72)*beta^3*a^4*y^6+(1/504)*beta^4*a^5*y^8-(5/18144)*beta^5*a^6*y^10+(1/27216)*beta^6*a^7*y^12-(95/19813248)*beta^7*a^8*y^14+O(y^16), polynom);
1       2  2   1      2  3  4   1      3  4  6
a - - beta a  y  + -- beta  a  y  - -- beta  a  y
2              12               72

1      4  5  8     5       5  6  10     1       6  7  12
+ --- beta  a  y  - ----- beta  a  y   + ----- beta  a  y
504               18144                27216

95        7  8  14
- -------- beta  a  y
19813248
L := [seq(coeff(theta, y, n), n = 0 .. 14)];
[        1       2     1      2  3       1      3  4
[a, 0, - - beta a , 0, -- beta  a , 0, - -- beta  a , 0,
[        2             12                72

1      4  5         5       5  6       1       6  7
--- beta  a , 0, - ----- beta  a , 0, ----- beta  a , 0,
504                18144              27216

95        7  8]
- -------- beta  a ]
19813248         ]
with(gfun);
rec := listtorec(L, u(n));
[ //      2     2  3         2     2  2          2     2  \
[{ \2151 a  beta  n  - 1434 a  beta  n  - 30592 a  beta  n/ u(n) +
[ \

/             3                  2
\2476 a beta n  - 137904 a beta n  + 207248 a beta n

\
+ 424320 a beta/ u(n + 2)

/         3           2                      \
+ \-153660 n  - 322920 n  + 1803360 n + 2545920/ u(n + 4),

1       2          \      ]
u(0) = a, u(1) = 0, u(2) = - - beta a , u(3) = 0 }, ogf]
2                  /      ]

rsolve(rec[1], u);
/ //      2     2  3         2     2  2          2     2  \
rsolve|{ \2151 a  beta  n  - 1434 a  beta  n  - 30592 a  beta  n/
\ \

/             3                  2
u(n) + \2476 a beta n  - 137904 a beta n  + 207248 a beta n

\
+ 424320 a beta/ u(n + 2)

/         3           2                      \
+ \-153660 n  - 322920 n  + 1803360 n + 2545920/ u(n + 4),

1       2          \    \
u(0) = a, u(1) = 0, u(2) = - - beta a , u(3) = 0 }, u|
2                  /    /
sum(%*y^n, n = 0 .. infinity);
Error, (in rsolve/linindex) invalid subscript selector

thanx

## Why doesn't this code works ? how can it work ?...

I'm trying to generate 100 equation to solve them numerically , buy maple won't let me , here's the code :

for i by 0 to 99 do
a := a[i]+a[i+1] = i^2
end do ;

## Recurrence relations....

Can anyone coax Maple to solve this reccurence relation? It seems harmless enough but Maple is struggng a bit with "hypergeomsols."

f := c -> (2*n-c)*f(c-1) - (c-1)*n*f(c-2);

f(0) := 1;

f(1) := 2*n-1;

## continued fraction/sums rsolve...

Would someone be kind enough to write rsolve procedures (or code) to evaluate these two sums

the answers are 3 and 7/4

## Can't solve recurrence system...

Hello guys,
I'm newb with Maple and trying to solve the following nonlinear recurrence system:

rsolve ({L(0)=1,L(n)=1.025*L(n-1),h(n)=L(n)/(1.1*L(n)-0.1*v(n-1)),v(0)=0.5,v(n)=(1+h(n))*v(n-1)},{L,h,v});

But Maple returns me nothing, no error. What's might be the problem?

## How to rsolve this one dimensional recurrence equa...

L := Summation(Summation(g(m, n)-g(m-1, n)-g(m, n-1), m = 1 .. 3), n = 1 .. 3);

M1 := subs(m=1, g(m, n)-g(m-1, n)-g(m, n-1))=0;

rsolve(rhs(M1),g,'genfunc'(1,b));

Error, invalid input: rsolve uses a 2nd argument, Fcns, which is missing

Reference:

Matrix([[0, g(0,1), g(0,2)],[g(1,0), g(1,1), 0],[g(2,0), 0, g(2,2)]]);

## how to rsolve two variables function in this case...

rsolve({g(m, n) = g(m − 1, n) + g(m, n − 1)},g,'genfunc'(a,b));

why no solution

## Solve a pair of recurrence relations...

How can I solve a pair of recurrence relations like this in maple 16?

``{A(k)=1+((n-k-2)``

## What do rsolve solve for...

if rsolve is solving difference equation for L(x) in summation(L*z^n, n=0..infinity)

can i use double encapsulation to solve for summation(L*z^n/n!, n=0..finity)

step 1 use rsolved result of a given classic difference equation times z^n/n! * t^n

step 2 then summation step 1 and use celine method to change into difference equation again

step 3 solve this new difference equation

then i imagine L should be L*z^n/n!

but i am not sure...

## How to sumtohyper this?...

I use Hermit as example and try the following way, it can not sumtohyper,

how to get the hyper form from a differential equation?

restart;
with(gfun):
test4 := diff(P(x),x\$2)-2*x*diff(P(x),x)+2*n*P(x)=0;
test4 := {diff(P(x),x\$2)-2*x*diff(P(x),x)+2*n*P(x), P(0) = 1, (D(P))(0) = 1};
newtest4 := borel(test4, P(x), diffeq);
rec4 := diffeqtorec(newtest4, P(x), a(v));
rec4 := diffeqtorec(test4, P(x), a(v));
genfun := rsolve(rec4, a(v), 'genfunc'(z));

rsolve(a(n)=2/a(n-1)+1,a(1)=1),

## How to convert q-Hermit recurrence equation into e...

with the information in the page