nothing appears with this code

1 view (last 30 days)
syms t;
x(t) = sin(3*t^2)*(12*t + (10*13^(1/2))/13);
y(t) = t*(6*13^(1/2)*t + 5);
z(t) = cos(3*t^2)*(12*t + (10*13^(1/2))/13);
%Length of the curve - Arc Length
speed(t) = sqrt(diff(x(t),t)^2 + diff(y(t),t)^2 + diff(z(t),t)^2);
speedsim(t) = prod(sqrt(factor(simplify(expand(speed(t)^2)))));
int(speed(t),t, 0, 2*pi);
I'm trying to find Arc Length in numerical value, but it doesn't work. Nothing appears when I click start button. Also, I don't know what to add to get numerical value because it seems like it would appear just a formula.

Accepted Answer

Star Strider
Star Strider on 8 Mar 2020
Use vpaintegral instead of int:
syms t;
x(t) = sin(3*t^2)*(12*t + (10*13^(1/2))/13);
y(t) = t*(6*13^(1/2)*t + 5);
z(t) = cos(3*t^2)*(12*t + (10*13^(1/2))/13);
%Length of the curve - Arc Length
speed(t) = sqrt(diff(x(t),t)^2 + diff(y(t),t)^2 + diff(z(t),t)^2);
speedsim(t) = prod(sqrt(factor(simplify(expand(speed(t)^2)))));
AL = vpaintegral(speed,t, 0, 2*pi)
producing:
AL =
6363.37

More Answers (0)

Categories

Find more on Symbolic Math Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!