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

5 Ansichten (letzte 30 Tage)

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 16 Mai 2023
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 Kommentare
Walter Roberson
Walter Roberson am 16 Mai 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)
loyal
loyal am 16 Mai 2023
Sorry, I mean versions younger than 2022 will not work。It solved Thank you so much! Have a good day

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by