0
$\begingroup$

enter image description here

The "F" function is defined as mentioned, but when I call the function F inside the code, "F" can't compute value using the function F, just give F_0, F_1, etc. Can somebody guide me what is the problem with the definition? Thank you in advance!

$\endgroup$
3
  • 3
    $\begingroup$ Welcome to the Mathematica Stack Exchange. In order to replicate the difficulty you face in our own notebooks so that it can be studied and resolved promptly, we need you to provide copy-paste-able Mathematica code. Copy directly from your input cell, click the Edit button under your post and format as code using the { } icon in the Edit window. Thanks. $\endgroup$
    – Syed
    Commented Sep 21, 2022 at 10:44
  • 4
    $\begingroup$ Something like f[k_+1]:=k^2 will not work, you would have to rewrite that as f[k_]:=(k-1)^2. $\endgroup$
    – user293787
    Commented Sep 21, 2022 at 11:06
  • $\begingroup$ Pattern matching is literal. Subscript[F, 0] does not match the pattern Subscript[F, Plus[1, Pattern[k, Blank[]]]] $\endgroup$
    – Bob Hanlon
    Commented Sep 21, 2022 at 14:15

1 Answer 1

3
$\begingroup$

Here is your code with correct syntax:

z[0] = 1;
z[k_] := (1 - (1 + a)/k) z[k - 1];
f[k_] := (3/2)^
    a (Sum[z[k] z[k - t + 1], {r, 2, k}] + (1/2^(k + 1) z[k + 1]));
m0 = 1/(25 f[0]/36 + 10  s1/3)
m1 = -5 f[0]/72 + 2 s1/3 
m2 = -f[0]/144 + s1/6

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you so much $\endgroup$
    – Asim
    Commented Sep 22, 2022 at 7:18

Your Answer

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

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