Borrar filtros
Borrar filtros

Numerical Integration on Matlab

2 visualizaciones (últimos 30 días)
Emrah Can Ucar
Emrah Can Ucar el 7 de Abr. de 2022
Editada: Torsten el 8 de Abr. de 2022
There are 4 integrals I need to write, but I can't get correct results from them. Did I write it right?
Equations that end in c are constants. they don't change
xi_0 = r(1)/Rprop;
xi_1 = 1;
I1_c = 4*G*(1-epsilon*tan(phi));
I1 = integral(@(xint) xint*I1_c, xi_0, xi_1);
I2_c = lambda*(1+epsilon/tan(phi))*sin(phi)*cos(phi);
I2 = integral(@(xint) ((xint*I1_c)/2.*xint),xi_0,xi_1);
J1_c = 4*G*(1+epsilon/tan(phi));
J1 = integral(@(xint) xint*J1_c ,xi_0, xi_1);
J2_c = (1-epsilon*tan(phi))*((1+cos(2*phi))/(2));
J2 = integral(@(xint) (xint*J1_c)/2 ,xi_0,xi_1);

Respuestas (2)

Riccardo Scorretti
Riccardo Scorretti el 8 de Abr. de 2022
Hi. I would say no: you forget to multiply I2 and J2 by the respective constants I2_c and J2_c. That being said, these functions are polynomials with respect to xi: at your place I would go analytically.

Torsten
Torsten el 8 de Abr. de 2022
Editada: Torsten el 8 de Abr. de 2022
I2 = integral(@(xint) ((xint*I1_c*I2_c)/2.*xint),xi_0,xi_1);
J2_c = (1-epsilon*tan(phi))*(cos(phi))^2;
J2 = integral(@(xint) (xint*J1_c)/2*J2_c ,xi_0,xi_1);
Not sure whether
I2' = lambda*(I1'/2 * zeta ...
or
I2' = lambda*(I1'/(2*zeta) ...
Some authors write
1/2*zeta
and mean
1/(2*zeta)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by