vpasolve: Cannot differentiate the equation

12 visualizaciones (últimos 30 días)
Sreejath S
Sreejath S el 13 de En. de 2020
Comentada: Sreejath S el 13 de Mayo de 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 comentarios
darova
darova el 13 de En. de 2020
What about numerical solution?
Sreejath S
Sreejath S el 13 de Mayo de 2020
Yes, Numerical solution worked for this case. Thanks!!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Numerical Integration and Differential Equations en Help Center y File Exchange.

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by