Need help with integrals and derivatives

조회 수: 1 (최근 30일)
Chris
Chris 2013년 6월 20일
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.

답변 (2개)

Roger Stafford
Roger Stafford 2013년 6월 20일
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.

Walter Roberson
Walter Roberson 2013년 6월 20일
x = @(t) sin(t) + t.^2;
Then try
x([0 1/4 1/3 1/2 1])
  댓글 수: 1
Chris
Chris 2013년 6월 20일
Ok that's helps me with the first two but I am lost on derivatives. Could you explain how those work and how I can format it to this situation?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by