How to use matlab to solve the expression of w with respect to x?

5 次查看(过去 30 天)

采纳的回答

Walter Roberson
Walter Roberson 2023-5-16
syms w(x)
syms c real
dw = diff(w); d2w = diff(dw);
eqn = d2w/(1+dw^2)^(3/2) == c*x
eqn(x) = 
sol = dsolve(eqn)
sol = 
The integrals are possibly not expressable in closed form solutions.
  5 个评论
Walter Roberson
Walter Roberson 2023-5-16
R2022a:
>> syms w(x)
syms c real
dw = diff(w); d2w = diff(dw);
eqn = d2w/(1+dw^2)^(3/2) == c*x
sol = dsolve(eqn)
eqn(x) =
diff(w(x), x, x)/(diff(w(x), x)^2 + 1)^(3/2) == c*x
sol =
C2 + int(((-(c*x^2 + 2*C1 - 2)*(c*x^2 + 2*C1 + 2))^(1/2)*(c*x^2 + 2*C1))/(4*C1^2 + 4*C1*c*x^2 + c^2*x^4 - 4), x, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)
C3 + int((c*x^2 + 2*C1)/(- 4*C1^2 - 4*C1*c*x^2 - c^2*x^4 + 4)^(1/2), x, 'IgnoreSpecialCases', true, 'IgnoreAnalyticConstraints', true)
So I do not know what you are seeing that leads you to think that the R2022* versions are unable to solve this the same way as the current version.
Those are two solutions. not a sum. You can access sol(1) and sol(2)
loyal
loyal 2023-5-16
Sorry, I mean versions younger than 2022 will not work。It solved Thank you so much! Have a good day

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by