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 件のコメント

darova
darova 2020 年 1 月 13 日
What about numerical solution?
Sreejath S
Sreejath S 2020 年 5 月 13 日
Yes, Numerical solution worked for this case. Thanks!!

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeNumerical Integration and Differential Equations についてさらに検索

製品

リリース

R2017a

質問済み:

2020 年 1 月 13 日

コメント済み:

2020 年 5 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by