How do I check validity of logarithm rule?

4 ビュー (過去 30 日間)
Love Gerdin
Love Gerdin 2018 年 11 月 26 日
編集済み: Stephan 2018 年 11 月 26 日
Hello, I want to check if the logarthm product rule is true using MATLAB R2018a.
I have tested the functions logical and isAlways without success. My code:
syms a;
syms b;
isAlways (log(a*b) == log(a)+log(b))
Which returns the following in command window:
Warning: Unable to prove 'log(a*b) == log(a) + log(b)'.
> In symengine
In sym/isAlways (line 42)
In test (line 12)
ans =
logical
0

採用された回答

Stephan
Stephan 2018 年 11 月 26 日
編集済み: Stephan 2018 年 11 月 26 日
Hi,
Matlab can prove if you give an assumption additionally:
syms a b;
assume([a b],'positive');
assumptions
result = isAlways(log(a*b) == log(a)+log(b))
results in:
ans =
[ 0 < a, 0 < b]
result =
logical
1
Best regards
Stephan

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by