Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: Solving Implicit Integral Date: Fri, 5 Jul 2013 06:59:09 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 70 Message-ID: <kr5qrt$orp$1@newscl01ah.mathworks.com> References: <kr1onj$eql$1@newscl01ah.mathworks.com> <kr3513$plo$1@newscl01ah.mathworks.com> <kr4epu$n7i$1@newscl01ah.mathworks.com> <kr5pim$m7r$1@newscl01ah.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: www-00-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1373007549 25465 172.30.248.45 (5 Jul 2013 06:59:09 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Fri, 5 Jul 2013 06:59:09 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 3799640 Xref: news.mathworks.com comp.soft-sys.matlab:798811 "Torsten" wrote in message <kr5pim$m7r$1@newscl01ah.mathworks.com>... > "Mayur" wrote in message <kr4epu$n7i$1@newscl01ah.mathworks.com>... > > Hi Torsten > > > > I guess I made a slight error in writing up the equation. > > The integral is raised to power (negative) 1 > > > > Maybe this was not clear in my original post. > > > > The right equation looks like: > > > > U(t) = C^-1 > > > > where C = integral(0-1) [dz/tanh(A*z + arctanh(1-A*y(t)))] > > > > Please let me know how to go about solving it. > > > > Thanks > > Mayur > > > > "Torsten" wrote in message <kr3513$plo$1@newscl01ah.mathworks.com>... > > > "Mayur" wrote in message <kr1onj$eql$1@newscl01ah.mathworks.com>... > > > > Hi > > > > > > > > I want to solve the following equation using MATLAB but do not know or understand how to do it. > > > > > > > > I would really appreaciate your help on this. > > > > > > > > The equation is : > > > > > > > > U(t) = integral(0-1) [dz/tanh(A*z + arctanh(1-A*y(t)))]^-1 > > > > > > > > where y(t) = integral (0-t) U(t)dt and A is a constant > > > > > > > > y(0)=0 > > > > > > > > or same can be written as : > > > > > > > > dy/dt = integral(0-1) [dz/tanh(A*z + arctanh(1-A*y(t)))]^-1 > > > > > > > > Please let me know if someone can help me with this. I am just not sure how to go about it. > > > > > > > > Thanks > > > > > > I don't understand what you mean by > > > [dz/tanh(A*z + arctanh(1-A*y(t)))]^-1. > > > Do you want to take "dz" in the denominator ? > > > > > > Best wishes > > > Torsten. > > In this case, you have a simple differential equation of the form > dy/dt= 1/integral(0-1) [dz/tanh(A*z + arctanh(1-A*y(t)))] > with initial condition y(0)=0. > Use ODE45 which solves equations of the form > dy/dt=f(t,y). > In the function routine where you have to supply f(t,y), call MATLAB's > quad function to evaluate the integral for the y-value supplied by ODE45. > > Best wishes > Torsten. > Or even simpler (because the integral can be evaluated analytically): dy/dt = A/(log(sinh(A+arctanh(a-A*y)))-log(sinh(arctanh(a-A*y)))) with initial condition y(0)=0. Best wishes Torsten.