Hello I'm having trouble computing this function
I've tried doing it in this format but I'm struggling on actually making the equation itself.
syms x
f = x^-1*(sin*(x^-1*log(x))) ;
Fint = int(f,x,[0 1])
Fvpa = vpa(Fint)
However its giving me an "Error using sin"
How would I find the integral of this function?

 채택된 답변

VBBV
VBBV 2022년 11월 7일

0 개 추천

f = x^-1*(sin(x^-1*log(x))) ; %

댓글 수: 5

VBBV
VBBV 2022년 11월 7일
As sin is builtin function it expects input within ( ) . If you include * between sin and ( then it violates the syntax of sin function provided here
Why doesn't it compute my integral?
syms x
f = x^-1*(sin(x^-1*log(x))) ;
Fint = int(f,x,[0 1])
Fint = 
Fvpa = vpa(Fint)
Fvpa = 
VBBV
VBBV 2022년 11월 7일
편집: VBBV 2022년 11월 7일
syms x
f = x^-1*(sin(x^-1*log(x))) ;
Fint = int(f,x,[0 1]) % symbolic integration
Fint = 
f = @(x) x.^-1.*(sin(x.^-1.*log(x))) ; % numeric integration
Fvpa = integral(f,0,1)
Warning: Reached the limit on the maximum number of intervals in use. Approximate bound on error is 7.5e+00. The integral may not exist, or it may be difficult to approximate numerically to the requested accuracy.
Fvpa = 4.0483
It has evaluated the expression, but
(a) symbolically in first case,
(b) numerically in second case
Howie
Howie 2022년 11월 7일
thank you!
Did you plot the function ?
syms x
f = x^-1*(sin(x^-1*log(x))) ;
fplot(f,[0.01 0.1])

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

제품

릴리스

R2022a

질문:

2022년 11월 7일

댓글:

2022년 11월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by