how can i integrate this function ?

Hello everybody , i have the bellow function , i want to integrate it from a to b
but the result is not complete , there is no result for a , the code for this
function is :
syms y
syms bx
syms v
syms a
syms b
% c is constant
f= y / ((bx - y)^2/v + 1)^(v/2)
z = int ( f , a,b , y )
***
the result after i run it in matlabe is :
z =
-(y*(b - y))/((bx - y)^2/v + 1)^(v/2)

Antworten (1)

Steven Lord
Steven Lord am 10 Mär. 2018

0 Stimmen

You're close. Look at the documentation for the int function. Pay close attention to the order of the input arguments and what each input argument represents.

6 Kommentare

elham kreem
elham kreem am 10 Mär. 2018
i want to thanks for you
i applied this code , but no result
z = int ( f , y , [a,b] )
the result was :
z =
int(y/((bx - y)^2/v + 1)^(v/2), y, a, b)
Torsten
Torsten am 12 Mär. 2018
Where did you find this syntax with "[a,b]" for "int" ? It's wrong.
elham kreem
elham kreem am 12 Mär. 2018
from help of matlab , as :
int(expr,var,a,b) computes the definite integral of expr with respect to var from a to b. If you do not specify it, int uses the default variable determined by symvar. If expr is a constant, then the default variable is x.
int(expr,var,[a,b]), int(expr,var,[a b]), and int(expr,var,[a;b]) are equivalent to int(expr,var,a,b).
** If I'm imposed values for a and b , also , the result as the same
elham kreem
elham kreem am 12 Mär. 2018
and if i omit a ,b , the result is :
int(y/((bx - y)^2/v + 1)^(v/2), y)
Torsten
Torsten am 12 Mär. 2018
This indicates that MATLAB was not able to find an analytical expression for the integral. You will have to insert numerical values for b and v, numerical values for the limits a and b and use "integral" for a numerical approximation of the integral.
elham kreem
elham kreem am 14 Mär. 2018
thank you

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 10 Mär. 2018

Kommentiert:

am 14 Mär. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by