[Custom Functions] Substitution in expressions with dummy variables (diff, sum etc.)

[Custom Functions] Substitution in expressions with dummy variables (diff, sum etc.) - Сообщения

#1 Опубликовано: 26.07.2023 16:03:12
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Consider the following example. Substitution using at() is applied to a symbolic expression. Once f(t) is not defined, the derivative can't be calculated. It is nice, that t is not just replaced by 0 but the result anyways is not correct. The return value should be the unmodified input expression if evaluation/simplification fails.

You see the problem if you evaluate input and return value for a particular f(x), the results aren't equal.

Blatt20.png
Blatt20.sm (5 КиБ) скачан 64 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Опубликовано: 26.07.2023 17:52:02
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

I don't know what the intention of the author of the at() function is, but what I can observe in other CAS is that there are always something like two versions for the substitution, in which perhaps one maybe returns the expected results.

Clipboard02.png

Clipboard01.png

My opinion is that the only procedure about which it can be said that the substitution is correct or not is the limit operation

Clipboard03.png

Maybe Maxima can redefine at() using limits.

Best regards.
Alvaro.
1 пользователям понравился этот пост
Martin Kraska 26.07.2023 18:13:00
#3 Опубликовано: 26.07.2023 18:10:09
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Whatever I do on Maxima side, if the result contains a symbolic non-simplificable substitution (can happen with laplace transforms) then I'd like to display that using the at() function with it's nice operator form to display the result. Yet, as of now, the function isn't robust enough for this.

In the example below you see that the return value from Maxima contains an expression with at(), which is removed on SMath postprocessing side even if optimization=none.
It is part of the test suite for Maxima in the interactive handbook or on github.

2023-07-26 23_05_43-SMath Solver - [Plugin Maxima Test Suite.sm_].png

The limit function, by the way is another construction site. Currently, it is not possible to use the single-sided limits. We have that on our todo list.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 пользователям понравился этот пост
Alvaro Diaz Falconi 26.07.2023 22:13:00
#4 Опубликовано: 27.07.2023 04:47:43
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hi Martin,

I think I can handle it plugin-side, I'll look into it ASAP.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
sergio 27.07.2023 08:19:00
#5 Опубликовано: 27.07.2023 13:11:57
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Wrote

You see the problem if you evaluate input and return value for a particular f(x), the results aren't equal.


Pretty obvious that f(x):= sin(0.5*x)
evaluation t=0 will not be same.
Vectorize over t[0,0.125..pi]
#6 Опубликовано: 28.07.2023 12:48:23
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

By same token of diff at(2)
1. 1rst derivative of erf(x) is the integrand.
that you derive D(n,x) at will, range/vectorize.
2. Derivative of Gamma(x) from infinitesimal analysis.
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений