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?

 Akzeptierte Antwort

VBBV
VBBV am 7 Nov. 2022

0 Stimmen

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

5 Kommentare

VBBV
VBBV am 7 Nov. 2022
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 am 7 Nov. 2022
Bearbeitet: VBBV am 7 Nov. 2022
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 am 7 Nov. 2022
thank you!
Did you plot the function ?
syms x
f = x^-1*(sin(x^-1*log(x))) ;
fplot(f,[0.01 0.1])

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte

Version

R2022a

Gefragt:

am 7 Nov. 2022

Kommentiert:

am 7 Nov. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by