필터 지우기
필터 지우기

how to solve logarithm equation

조회 수: 2 (최근 30일)
MANANJAYA NAYAK
MANANJAYA NAYAK 2022년 10월 11일
답변: David Hill 2022년 10월 11일
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
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일
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일
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일
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.

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by