From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Calculating the limit of an integral
Date: Fri, 30 Mar 2012 13:52:12 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 23
Message-ID: <jl4dqc$f8c$>
References: <jl2mtk$a37$> <jl3017$adm$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1333115532 15628 (30 Mar 2012 13:52:12 GMT)
NNTP-Posting-Date: Fri, 30 Mar 2012 13:52:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3403027
Xref: comp.soft-sys.matlab:762683

"Roger Stafford" wrote in message <jl3017$adm$>...
> "Haojie" wrote in message <jl2mtk$a37$>...
> > ..... I have a implicit equation that the limit (t) is unknow. And t is also in the integrand. x is the variable
> > The equation is like
> > int(sqrt(A*x^(2/7)-A*t^(2/7)),0,t)-int(sqrt(A*t^(2/7)-A*x^(2/7),t,1)=0
> > I want to solve for t numerically .......
> - - - - - - - - -
>   I assume A is a negative scalar.  Otherwise you would be taking the square roots of negative quantities.  Other than that I don't see the purpose in including A here.  The square root of -A can be factored out.
>   Also you are missing a right parenthesis on the second square root.
>   You can probably solve this using matlab's 'fzero' routine.  However, its function handle will have to be written so as to perform numerical quadrature on a vector of different t values passed to it, two integrations for each t element.
> Roger Stafford
Thanks for your reply.
Do you mean I should write like this?
function y1 = f1(x);
function y2 = f2(x);
y1 = sqrt(t^(2/7)-x^(2/7));
y2 = sqrt(x^(2/7)-t^(2/7));
Q1 = quad(@f1,0,t);
Q2 = quad(@f2,t,1);
But then I dont know how to use fzero to calculate t, because Q1 - Q2=0 is not a function so cannot be used in fzero. I dont know if you mean this or please correct me if I understand wrong