vpasolve: Cannot differentiate the equation

Hello friends,
I need to solve some nonlinear equation defined symbolically, using vpasolve.Specifically arc length parameterization of a curve y=u^2-u^3. I need to find the value of u for a given arc length of the curve. I am getting an error. If I change the curve equation to y=u^2-u, the code works fine. It seems there is a problem with the integral. Someone kindly help me to troubleshoot this issue. Is there any other ways I can solve a symbolic equation numerically.
clear; clc
syms u
y=u^2-u^3; % Curve equation
%y=u^2-u; % This curve is giving solution!!
arc_length=1;% prescribed arc length of the curve
objective_function=int(sqrt(1+(diff(y))^2),u); % Arc length of the curve from u=0 to u=u
f1=subs(objective_function,u); % Definite integral upper limit evaluation
f2=subs(objective_function,0); %Definite integral lower limit evaluation
vpasolve(f1-f2==arc_length,u)
Error:
Error using mupadengine/feval (line 166)
Cannot differentiate the equation.
Error in sym/vpasolve (line 172)
sol = eng.feval('symobj::vpasolve',eqns,vars,X0);
Error in vpa_solver_issue (line 7)
vpasolve(f1-f2==arc_length,u)

2 个评论

What about numerical solution?
Yes, Numerical solution worked for this case. Thanks!!

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

产品

版本

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by