0
$\begingroup$

I've been replicating a class handout on l'Hôpital's Rule in Mathematica. All of the results match the professor's worksheet except this one:

ClearAll;
f[x_] := (1 - x + Log[x])/(1 + Cos[\[Pi]x])
Limit[f[x], x -> 1]

...which returns "0". Both the worksheet and Symbolab conclude that the answer is -1/π^2. Thoughts?

$\endgroup$

1 Answer 1

2
$\begingroup$

You had πx and it was not recognized as Pi times x. Try the following:

f[x_] := (1 - x + Log[x])/(1 + Cos[π x])
Limit[f[x], x -> 1]

lim

$\endgroup$
2
  • $\begingroup$ Thank you! All set. $\endgroup$
    – Tom Barson
    Mar 22 at 1:15
  • $\begingroup$ @TomBarson Glad I was able to help :-) $\endgroup$
    – bmf
    Mar 22 at 1:15

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