How to use matlab to solve the expression of w with respect to x?
5 views (last 30 days)
Show older comments

0 Comments
Accepted Answer
Walter Roberson
on 16 May 2023
syms w(x)
syms c real
dw = diff(w); d2w = diff(dw);
eqn = d2w/(1+dw^2)^(3/2) == c*x
sol = dsolve(eqn)
The integrals are possibly not expressable in closed form solutions.
5 Comments
Walter Roberson
on 16 May 2023
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)
More Answers (0)
See Also
Categories
Find more on Symbolic Math Toolbox 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!
