Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
References: <jl2mtk$a37$1@newscl01ah.mathworks.com> <jl3017$adm$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1333115532 15628 172.30.248.35 (30 Mar 2012 13:52:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 30 Mar 2012 13:52:12 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3403027
Xref: news.mathworks.com comp.soft-sys.matlab:762683

"Roger Stafford" wrote in message <jl3017$adm$1@newscl01ah.mathworks.com>...
> "Haojie" wrote in message <jl2mtk$a37$1@newscl01ah.mathworks.com>...
> > ..... 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