Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Integration- division by zero
Posted 4 mar 2016, 22:26 GMT-5 Version 5.1 0 Replies
Please login with a confirmed email address before reporting spam
I am so confused about this equation below :
int(1/sqrt(1-x^2),x,0,1) = pi/2 (solved in Matlab)
However in Comsol, using global ODE and DAEs :
integrate(1/sqrt(1-x^2),x,0,1) causes error (division by zero)
But if I added "eps" like this :
integrate(1/sqrt(1-phi^2),phi,0,1-eps)=pi/2 (worked properly) (1)
So, in global ODE and DAEs(ge),
name= lf,
f(u,ut,utt,t)= integrate(1/sqrt(lf^2-x^2),x,0,lf-eps)-lf, (2)
initial value= 1
Equation (2) is like equation(1) ( phí=x/lf) . So integrate(1/sqrt(lf^2-x^2),x,0,lf-eps) should be = pi/2
The result I expected was lf= pi/2, but it showed lf=1 (=initial value)
I am so confused!!!
How can I write that function in Comsol and get the right result?
Thank you very much for help !!!
Hello Nhan Nguyen
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.