| 
     
      
      
      From: Eduardo O. <edu...@gm...> - 2024-11-20 12:57:37
      
     
   | 
Hi Barton! Thanks!
Here is a workaround, by the way... the function limit_H below applies
L'Hospital in the most naive way possible, without checking if the
conditions for L'Hospitalization are met - and in the textbook
problems that I was trying to solve with Maxima it is enough to run
limit_H when limit does not work.
  limit_H(frac, var, val) :=
    at(diff(num  (frac), var), var=val) /
    at(diff(denom(frac), var), var=val)$
  limit  ((sin(42+eps)-sin(42))/eps, eps, 0);   /* cos(42) */
  limit_H((sin(42+eps)-sin(42))/eps, eps, 0);   /* cos(42) */
  limit  ((sin(x)-sin(5))/(x-5), x, 5);         /* cos(5) */
  limit_H((sin(x)-sin(5))/(x-5), x, 5);         /* cos(5) */
  gradef(f(x), f_x(x))$
  limit  ((f(42+eps)-f(42))/eps, eps,0);        /* a limit */
  limit_H((f(42+eps)-f(42))/eps, eps,0);        /* f_x(42) */
  limit  ((f(x)-f(5))/(x-5), x,5);              /* a limit */
  limit_H((f(x)-f(5))/(x-5), x,5);              /* f_x(5)  */
Cheers!
  Eduardo
On Mon, 18 Nov 2024 at 20:18, Barton Willis <wi...@un...> wrote:
> It would be a nice feature, but Maxima's limit code doesn't have a way to
> do this. There is an option variable limsubst that "prevents limit
> <https://maxima.sourceforge.io/docs/manual/maxima_singlepage.html#limit> from
> attempting substitutions on unknown forms." Here is an example of what this
> option variable does:
>
>
> (%i7) limit(F(x),x,%pi);
>
> (%o7) 'limit(F(x),x,%pi)
> (%i8) limsubst : true;
>
> (%o8) true
> (%i9) limit(F(x),x,%pi);
>
> (%o9) F(%pi)
>
> I'd say that when limsubst is true, Maxima assumes that a function is
> continuous everywhere, unless it has some other understanding of the
> function—I think that is what the documentation calls an "unknown form."
>
> But as far as I can tell, setting  limsubst is true it doesn't allow
> Maxima to find the limit you asked about.
>
>
> --Barton
> ------------------------------
> *From:* Eduardo Ochs <edu...@gm...>
> *Sent:* Friday, November 15, 2024 22:37
> *To:* <max...@li...> <
> max...@li...>
> *Subject:* [Maxima-discuss] How do I tell limit that a function f is
> continuous?
>
> Caution: Non-NU Email
>
> Hi list,
>
> How do I tell "limit" that a function f is continuous, or smooth?
> I was hoping that the first limit below would yield f_x(42), but it
> doesn't without assumptions like continuity and differentiability...
>
>   gradef(f(x), f_x(x))$
>   limit((f(42+eps)-f(42))/eps, eps,0);
>   limit((sin(42+eps)-sin(42))/eps, eps,0);
>
> Thanks in advance!
>   Eduardo Ochs
>   http://anggtwu.net/eev-qdraw.html
> <https://urldefense.com/v3/__http://anggtwu.net/eev-qdraw.html__;!!PvXuogZ4sRB2p-tU!HknIFRxu4TeK6Wx5hLBiygnycBCFhzZNgYJJ7LZPt603kcpvVNvPlH7iXDL3AXjgKo7uMozKRJGGWqht4AU$>
>  <- (work in progress)
>
>
 |