vpasolve: Cannot differentiate the equation
10 views (last 30 days)
Show older comments
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
Answers (0)
See Also
Categories
Find more on Numerical Integration and Differential Equations 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!