|
On 3/14/2012 3:23 PM, rsch tosh wrote:
> Hi could anyone help me with this ques
>
> y=x^3/25-3*x^2/625-2*x/15625
>
> I want to find the length of this equation using matlab. Please help
use the arc length formula, and integrate it using quad:
----------------------
syms y x
y = x^3/25-3*x^2/625-2*x/15625;
integrand = sqrt(1+(diff(y,x))^2)
---------------------
((- (3*x^2)/25 + (6*x)/625 + 2/15625)^2 + 1)^(1/2)
so the above is the function you need to integrate. Use
numerical integration. Make a function and apply quad:
-----------------------
myfun = @(x) ((- (3*x.^2)/25 + (6*x)/625 + 2/15625).^2 + 1).^(1/2)
from = 0;
to = 2;
Q = quad(myfun,from,to)
-------------------
Q =
2.0404
so, the length is about 2.
ezplot('x^3/25-3*x^2/625-2*x/15625',[0,2])
--Nasser
|