vpasolve: Cannot differentiate the equation

2 views (last 30 days)
Sreejath S
Sreejath S on 13 Jan 2020
Commented: Sreejath S on 13 May 2020
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 Comments
darova
darova on 13 Jan 2020
What about numerical solution?
Sreejath S
Sreejath S on 13 May 2020
Yes, Numerical solution worked for this case. Thanks!!

Sign in to comment.

Answers (0)

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!