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?

 Réponse acceptée

VBBV
VBBV le 7 Nov 2022
f = x^-1*(sin(x^-1*log(x))) ; %

5 commentaires

VBBV
VBBV le 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 le 7 Nov 2022
Modifié(e) : VBBV le 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 le 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])

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by