i want to solve an logarithm equation and find the value of x
log10(x^4)-log10(x^3) == log10(5*x) -log10(2*x)

4 件のコメント

Davide Masiello
Davide Masiello 2022 年 10 月 11 日
編集済み: Davide Masiello 2022 年 10 月 11 日
I believe that reduces to
and therefore there's no real solution to it
log10(4/3) == log10(5/2)
ans = logical
0
MANANJAYA NAYAK
MANANJAYA NAYAK 2022 年 10 月 11 日
yes its there but in code how to solve and find the x value
Ghazwan
Ghazwan 2022 年 10 月 11 日
syms a b c x
eqn = a*x^2 + b*x + c == 0
S = solve(eqn)
David Hill
David Hill 2022 年 10 月 11 日
Use fzero to solve a non-linear equation numerically. fzero

サインインしてコメントする。

 採用された回答

David Hill
David Hill 2022 年 10 月 11 日

0 投票

f=@(x)log10(x.^4)-log10(x.^3)-log10(5*x) +log10(2*x);
fzero(f,2)
ans = 2.5000
x=.1:.1:10;
plot(x,f(x));

その他の回答 (2 件)

David Hill
David Hill 2022 年 10 月 11 日

0 投票

if you plot, it never crosses zero.
f=@(x)log10(4*x)-log10(3*x) -log10(5*x) +log10(2*x)
f = function_handle with value:
@(x)log10(4*x)-log10(3*x)-log10(5*x)+log10(2*x)
fzero(f,1)
Exiting fzero: aborting search for an interval containing a sign change because NaN or Inf function value encountered during search. (Function value at -4.06772e+307 is -Inf.) Check function or try again with a different starting value.
ans = NaN
Torsten
Torsten 2022 年 10 月 11 日
編集済み: Torsten 2022 年 10 月 11 日

0 投票

log10(4*x)-log10(3*x) = log10((4*x)/(3*x)) = log10(4/3)
log10(5*x)-log10(2*x) = log10((5*x)/(2*x)) = log10(5/2)
So you try to "solve"
log10(4/3) = log10(5/2)
You can imagine that this makes no sense.

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

リリース

R2019b

タグ

質問済み:

2022 年 10 月 11 日

回答済み:

2022 年 10 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by