Need help with integrals and derivatives
4 views (last 30 days)
Show older comments
The length of a parameterized curve is the integral of the norm of the derivatives of the parameterized equations. So the curve length from time t1 to t2 is obtained by
s=integral(sqrt(x^2+y^2+z^2))from t1 to t2
Consider the curve parameterized by the equations
x(t)=sin(t)+t^2
y(t)=2t+cos(t)
z(t)=t
Write a program to determine
a) Length of this curve from t = 0 to t =3*pi.
b) Draw three dimensional plot of this curve.
c) Derivative of each component using the diff command
Please help I know I am going to have to use the trapz command but I am unsure how to do all three. It keeps telling me that t is undefined and I am not sure how to work it. Some help would be greatly appreciated.
0 Comments
Answers (2)
Roger Stafford
on 20 Jun 2013
You should not be using 'trapz' in this problem in which you can calculate, (using some standard calculus or matlab's symbolic toolbox,) the integrand as an explicit function of t. The 'trapz' function is really intended for inherently discrete data such as that from empirical observations. Instead use one of the quadrature functions such as 'integral' or 'quad' to do your numerical integration. It is likely your teacher will expect you to do it this way for this problem.
For a) what you want to find is the integral with respect to t over the given t-range of the square root of the sum of the squares of the three derivatives, and this integrand can be obtained as a function of t for which you can give an explicit formula.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!