Symbolic Integration, how to count when int can not compute?

1 view (last 30 days)
I have an unusual function with several symbolic parameters,that contains integral. I am trying to fit this function later to experimental data and acquire those parameteres. I tried to use 'integral', but it requires a function without any symbolic variables. Then I tried 'int', but the integral is too complicated and even after 30 mins I get no result- 'busy'. Is there any other method for integral solving?
Function looks like this-
photo and below it there are 4 parameters that we look for, all besides Ri which is our 'x' We know re, ri and Ri as Data of course. R=sqrt(Ri^2+ri^2+r^2)
For the clarity of this post I put the code in my second post.

Answers (3)

Sean de Wolski
Sean de Wolski on 10 Dec 2014
Use the curve fitting app ( cftool ) or lsqcurvefit to fit to the data finding those coefficients.
The use of a symbolic integral here does not sound necessary.
  1 Comment
Artur
Artur on 11 Dec 2014
/Could you please check the function problem and code for more precise answer as we have already tried those apps and they can't compute at all or do it wrong.

Sign in to comment.


Artur
Artur on 10 Dec 2014
1. We can not use the tool as we are not able to put the integral function as a function to fit.
2. Trying to solve this function first by using 'int' to get the final equation gives an obviously wrong result that contains complex number, which also can not be put into this app.
3.Lsqcurve fitting function can not contain symbolic numbers, so we can not use it.
4. We don't care that much about accuracy of our result so we tried to calculate it numerically using 'for loop', but even though the result was too complicated for app to handle.
The raw function contains double integral, 1 integral, 4 symbolic parameters that we are looking for.

Artur
Artur on 11 Dec 2014
Edited: Artur on 11 Dec 2014
syms Mse r rb Rik Mc mii gammai Ri %symboliczne dane %podmieniac sane subs(integer,Ri,RiT(1,i));
R=sqrt(Ri^2+ri^2+r^2); %
% integer 3 Mse
integer3=int((sqrt(Ri^2+ri^2+r^2)-r)/r,r); %dzialczy
c=subs(integer3,r,re);
d=subs(integer3,r,ri);
integer3calc=c-d;
integer3calc=vpa(integer3calc,4);
%integer2 wewn
tic;
integer2=int((R-rb)/rb*(gammai*r/ri/((rb-mii*r/ri)^2+(gammai^2/4*r^2/ri^2))),rb);
integer2=vpa(integer2,4);
e=subs(integer2,rb,R);
f=subs(integer2,rb,r);
integer2calc=e-f;
integer2calc=vpa(integer2calc,4);
toc;
q=0;
integer1calc=0;
for i=ri:((re-ri)/5):re;
integer1temp=subs(integer2calc,r,i);
integer1calc=integer1calc+integer1temp*(re-ri)/5;
q=q+1
end
integer1calc=vpa(integer1calc,4);
% sumowanie ogolne
TensionCo=Mc/2/pi*integer1calc;
TensionSe=Mse*integer3calc;
Tension=TensionCo+TensionSe;
Tension=vpa(Tension,4);
tic toc shows that the second integral it countrs for about 10 mins

Community Treasure Hunt

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

Start Hunting!