4
$\begingroup$

I am attempting to solve this recurrence relation.

T[n] = n^(1.5) + T[n - 4]

which I believe simplifies to

n^(2.5)

I have tried solving is a couple different ways with no success.

RSolve[T[n - 4] + n^(1.5) == 1, T[n], n]

Error: RSolve: n cannot be used as a function

RSolve[{T[n] == T[n - 4] + n^(1.5), T[1] = 1}, T[n], n]

Equation or list of equations expected instead of 1 in the first argument {n == n^(1.5) + T[-4 + n], 1}.

What am I doing incorrectly?

$\endgroup$
2
  • 2
    $\begingroup$ Use == instead of = in T[1]=1. This solves the problem, but the result looks much more complicated than your expected n^(2.5). Are you missing out on any assumptions ? $\endgroup$
    – Lotus
    May 26, 2017 at 2:56
  • $\begingroup$ @Lotus That output is not like anything I was expecting. What sort of assumptions would you recommend? trying Assumptions -> n > 0 didn't work, it said there was an unknown option Assumptions in RSolve. $\endgroup$
    – frillybob
    May 26, 2017 at 3:52

1 Answer 1

6
$\begingroup$

First, test the solution suggested in the question by evaluating the first several terms of the recurrence.

T[1] = 1
T[n_] := T[n - 4] + n^1.5
Table[T[n], {n, 1, 21, 4}]
(* {1, 12.1803, 39.1803, 86.0525, 156.145, 252.379} *)

and contrast this with the first several terms of the proposed solution.

Table[n^(2.5), {n, 1, 21, 4}]
(* {1., 55.9017, 243., 609.338, 1191.58, 2020.92} *)

They are not the same. Instead, the correct solution is obtained with RSolve by first substituting n == 4 m - 3 (valid, because T[n] is defined only for Mod[n, 4] == 1).

Clear[T]
Simplify[T[m] /. First@RSolve[{T[m] == T[m - 1] + (4 m - 3)^1.5, T[1] == 1}, T[m], m]]
(* -0.120874 - 8. HurwitzZeta[-1.5, 0.25 + m] *)

the correctness of which can be verified by

Table[%, {m, 6}]
(* {1., 12.1803, 39.1803, 86.0525, 156.145, 252.379} *)

as desired.

$\endgroup$
1
  • 1
    $\begingroup$ also, with exact coefficients, 1+8HurwitzZeta[-(3/2),5/4]-8HurwitzZeta[-(3/2),1/4+m] $\endgroup$ May 26, 2017 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.