ibnrushd5
(Mohammad Amir Khan)
1
I am unable to get real solutions for the following
DSolve[y'[x] ==[ y[x]/(x + Sqrt[x^2 + y[x]^2]), y[x], x,
GeneratedParameters -> c]
I get
{{y[x] -> -Sqrt[-E^c[1] (E^c[1] + 2 I x)]}, {y[x] ->
Sqrt[-E^c[1] (E^c[1] + 2 I x)]}, {y[
x] -> -Sqrt[-E^c[1] (E^c[1] - 2 I x)]}, {y[x] ->
Sqrt[-E^c[1] (E^c[1] - 2 I x)]}}
Here are some formula manipulations that yield complex-free results:
sol = DSolve[{y'[x] == y[x]/(x + Sqrt[x^2 + y[x]^2]),
y[0] == c}, y[x], x];
Simplify[sol, c > 1];
% // PowerExpand // TrigToExp;
Simplify[%, c > 1] // PowerExpand // ExpandAll // Simplify // Union
Check the results before you use them, because PowerExpand uses assumptions that may not be true. These may or may not additional solutions:
Simplify[sol, -1 < c < 1];
% // PowerExpand // TrigToExp;
Simplify[%, -1 < c < 1] // PowerExpand // ExpandAll //
Simplify // Union
Simplify[sol, c < -1];
% // PowerExpand // TrigToExp;
Simplify[%, -1 < c < 1] // PowerExpand // ExpandAll //
Simplify // Union