Ergebnis enthält "oder"
Show older comments
Ich erhalte
eqn(x) = y(x) == 0 | y(x)*diff(y(x), x, x) + diff(y(x), x)^2 == 0
Wie kann ich auf zweite Bedingung zugreifen?
3 Comments
Dyuman Joshi
on 8 Nov 2023
How do you get this particular expression?
Artur Walter
on 10 Nov 2023
Dyuman Joshi
on 22 Nov 2023
@Artur Walter, see my answer below.
Answers (2)
syms y(x)
f = y(x)^2 * (diff(y(x), x))^2;
eqn = functionalDerivative(f,y) == 0;
%Get the equation mentioned in the question description by using simplify()
eqn = simplify(eqn)
%Children of the expression
z = children(eqn)
%Access the second condition
condition2 = z{2}
Aiswarya
on 16 Nov 2023
0 votes
Hallo, ich würde die Frage auf Englisch beantworten.
(Hi,
I would be answering the question in English)
I understand that on equating a differential expression to zero, you obtained a conditional expression as a result.
The result obtained from the 'functionalDerviative' is a symbolic function and there is no direct way to just extract the second part of the "or" expression. However you can access the second condition by assuming condition for 'y' as shown in the following image.

You can use the assume function (https://www.mathworks.com/help/symbolic/sym.assume.html) to set non zero condition for y. And then simplify the equation to obtain just the second condition.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
