Integration of a function which has limits in terms of parameters

Hi,
I have a function f3(t), defined as
clc; clear all;
syms t L rho m L n T k G v
N(t) = (T*L/2)*(n*pi/L)^2+k*sin(n*pi*v*t/L);
D(t) = (rho*L/2+m*(sin(n*pi*v*t/L))^2);
alpha(t) = N/D;
i = 6; j = 1
f3(t) = alpha(t)*cos(2*pi*i*t/L)*sin(2*pi*j*t/L);
I3 = int(f3,t,0,L)
when i am integrating the function f3(t) from limits 0 to L, the code is not giving me the output in the form of some expression. The output i am getting is in the form of int(f3,t,0,L), which I dont want. I want output in the form of expression (which will contain t L rho m L n T k G v).
Please help me with this!! Any help will be appreciated..

5 件のコメント

Walter Roberson
Walter Roberson 2021 年 5 月 12 日
It is not obvious that a closed form integral for that exists.
aakash dewangan
aakash dewangan 2021 年 5 月 14 日
編集済み: aakash dewangan 2021 年 5 月 14 日
Hello Walter Roberson,
Thanks for reply. But in my question when i am providing the values of all the parameters (L rho m L n T k G v) then i am getting the answer in the form of some numerical value. Therefore, I am expecting the expression when values of parameters are not given. Could you please clarify this?
Thanks in advance
Perhaps you got lucky, or perhaps you made a mistake.
In the below, I substitute in numeric values for everything other than t, but matlab is not able to find the integral
syms t real
Pi = sym(pi);
rho = sym(randi([-99 99]))/10;
m = sym(randi([-99 99]))/10;
n = sym(randi([-99 99]))/10;
T = sym(randi([-99 99]))/10;
k = sym(randi([-99 99]))/10;
G = sym(randi([-99 99]))/10;
v = sym(randi([-99 99]))/10;
L = sym(randi(99))/10;
N(t) = (T*L/2)*(n*Pi/L)^2+k*sin(n*Pi*v*t/L);
D(t) = (rho*L/2+m*(sin(n*Pi*v*t/L))^2);
alpha(t) = N/D;
i = 6; j = 1;
f3(t) = alpha(t)*cos(2*Pi*i*t/L)*sin(2*Pi*j*t/L);
I3 = int(f3, t, [0,L])
I3 = 
aakash dewangan
aakash dewangan 2021 年 5 月 15 日
編集済み: aakash dewangan 2021 年 5 月 15 日
Walter Roberson, thanks again for your reply and help.
Yes, you are right. I got integration output for a few combinations of parameter values (not for all values). Thanks for help.
"Do you have any suggestion for me to do this (integration) using any other approach / method / technique??"
Thanks,
Walter Roberson
Walter Roberson 2021 年 5 月 16 日
I have no suggestions.
There just might be a change of variables available to make sin(n*pi*v*t/L) linear.
Is n*v known to be integer? If so then that would make a difference in the integration, as sin(n*pi*v*t/L) at t=L would be sin(n*pi*v) and if n*v were integer that would be 0 .

サインインしてコメントする。

 採用された回答

Jan
Jan 2021 年 5 月 14 日
syms t L rho m L n T k G v
N(t) = (T*L/2)*(n*pi/L)^2+k*sin(n*pi*v*t/L);
D(t) = (rho*L/2+m*(sin(n*pi*v*t/L))^2);
alpha(t) = N/D;
i = 6; j = 1;
f3(t) = alpha(t)*cos(2*pi*i*t/L)*sin(2*pi*j*t/L);
I3 = int(f3, t, [0,L])
I3 = 
As Walter has said already: There is no closed form solution of this integral. You can simplify it only, if you provide specific values for the parameters.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Mathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by