How to find following integral answer in matlab

1 次查看(过去 30 天)
Dear scholars,
I need to find soln of integral:
int((f1(x))^3 * f2(x), x, 0, L)
but matlab can not solve it,
Any ideas?
I also attach the code here
(fi(x) are all combintaions of trigonometrix and hyperbolic functions, and due to orthogonality we know that int(f1(x) * f2(x), x, 0, L)) = 0, but I need to make sure whenever the first function is cubed)
clc
clear all
close all
format long
L = 100e-3;
Areap = 2*(b*hp);
Areas = b*hs;
Areat = Areas + Areap;
roAt = ros*Areas + rop*Areap;
landaL = [1.875104, 4.694091, 7.854757];
landa = landaL./L;
syms x
a1 = (cosh(landaL(1)+cos(landaL(1))));
a2 = (sinh(landaL(1))+sin(landaL(1)));
% phi = (1/sqrt(roAt*L)) * (cosh(landa*x)-cos(landa*x)-(a1/a2)*(sinh(landa*x)-sin(landa*x)));
phi(1) = (1/sqrt(roAt*L)) * (cosh(landa(1)*x)-cos(landa(1)*x)-(a1/a2)*(sinh(landa(1)*x)-sin(landa(1)*x)));
b1 = (cosh(landaL(2)+cos(landaL(2))));
b2 = (sinh(landaL(2))+sin(landaL(2)));
% phi = (1/sqrt(roAt*L)) * (cosh(landa*x)-cos(landa*x)-(a1/a2)*(sinh(landa*x)-sin(landa*x)));
phi(2) = (1/sqrt(roAt*L)) * (cosh(landa(2)*x)-cos(landa(2)*x)-(b1/b2)*(sinh(landa(2)*x)-sin(landa(2)*x)));
% A01 = round(int(roAt*phi(1)*phi(1),x,0,L))
A11 = round(int(roAt*phi(1)*phi(2),x,0,L))
% A11 is = 0 showing and proving the orthogonality trait ...
A21 = int(roAt*(phi(1)^2)*phi(2),x,0,L)
%A21 = round(int(roAt*(phi(1)^2)*phi(2)),x,0,L)
  1 个评论
David Goodmanson
David Goodmanson 2020-3-31
Hi Alireza,
you did not supply the constants needed to calculate roAt, but since that quantity is only used as a normalization constant it does not affect whether an integral is zero or not. I just used roAt = 1. Now
A11 = double(int(roAt*phi(1)*phi(2),x,0,L))
A11 =
0.3165
so it's nonzero. Numerical integration gives the same result. That is more or less expected since the trig functions do not have an integral number of oscillations in the span from 0 to L. How do you justify using round in this situation?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by