• Re: solution of x* y'+y=2* (x* y)^0.5 ?

    From Nasser M. Abbasi@21:1/5 to Dr Huang on Sat Jul 9 02:04:12 2022
    On 7/9/2022 1:43 AM, Dr Huang wrote:
    wolfram gives
    (c1-x)^2/x
    is it right? did it seem wrong? what is yours?

    DrHuang.com

    Mathematica 13.1

    ClearAll[x, y]
    ode = x*y'[x] + y[x] == 2*(x*y[x])^(1/2);
    sol = DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

    gives

    {{y[x] -> (E^(C[1]/2) + x)^2/x}, {y[x] -> x}}

    The first is the general solution and the second is singular solution.

    The solution you give is a particular solution which satisfies the ode
    under the condition x>=C[1] only. You can see this by doing

    sol = y -> Function[{x}, (C[1] - x)^2/x]
    result = ode /. sol // FullSimplify

    Sqrt[(x - C[1])^2] + C[1] == x

    The above becomes identity when x >= C[1]

    ps. I do not use Wolfram Alpha.

    --Nasser

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr Huang@21:1/5 to All on Fri Jul 8 23:43:49 2022
    wolfram gives
    (c1-x)^2/x
    is it right? did it seem wrong? what is yours?

    DrHuang.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dr Huang@21:1/5 to Nasser M. Abbasi on Sat Jul 9 02:59:09 2022
    On Saturday, 9 July 2022 at 17:04:16 UTC+10, Nasser M. Abbasi wrote:
    On 7/9/2022 1:43 AM, Dr Huang wrote:
    wolfram gives
    (c1-x)^2/x
    is it right? did it seem wrong? what is yours?

    DrHuang.com
    Mathematica 13.1

    ClearAll[x, y]
    ode = x*y'[x] + y[x] == 2*(x*y[x])^(1/2);
    sol = DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

    gives

    {{y[x] -> (E^(C[1]/2) + x)^2/x}, {y[x] -> x}}

    The first is the general solution and the second is singular solution.

    The solution you give is a particular solution which satisfies the ode
    under the condition x>=C[1] only. You can see this by doing

    sol = y -> Function[{x}, (C[1] - x)^2/x]
    result = ode /. sol // FullSimplify

    Sqrt[(x - C[1])^2] + C[1] == x

    The above becomes identity when x >= C[1]

    ps. I do not use Wolfram Alpha.

    --Nasser

    thanks
    DrHuang.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to Nasser M. Abbasi on Sat Jul 9 21:47:40 2022
    Nasser M. Abbasi <[email protected]> wrote:
    On 7/9/2022 1:43 AM, Dr Huang wrote:
    wolfram gives
    (c1-x)^2/x
    is it right? did it seem wrong? what is yours?

    DrHuang.com

    Mathematica 13.1

    ClearAll[x, y]
    ode = x*y'[x] + y[x] == 2*(x*y[x])^(1/2);
    sol = DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

    gives

    {{y[x] -> (E^(C[1]/2) + x)^2/x}, {y[x] -> x}}

    The first is the general solution and the second is singular solution.

    The solution you give is a particular solution which satisfies the ode
    under the condition x>=C[1] only. You can see this by doing

    sol = y -> Function[{x}, (C[1] - x)^2/x]
    result = ode /. sol // FullSimplify

    Sqrt[(x - C[1])^2] + C[1] == x

    The above becomes identity when x >= C[1]

    Well, it depends on what Sqrt (or ^(1/2)). In general there
    are two square roots and in complex domain you can not
    really separate them, one will analytically continue to
    the other.

    AFAICS the (C[1] - x)^2/x is better. With complex C[1]
    writing E^(C[1]/2) is just obscure way of saying that we
    have arbitrary nonzero constant. This is even more obscure
    since replacing E^(C[1]/2) leads to valid solution. With
    real C[1] writing constat as E^(C[1]/2) excludes negative
    values and conseqently some solutions. And if you insist
    that argument to Sqrt must be positive, then you get
    restrictions on x anyway.

    BTW: AFAICS 0 is singular solution, not covered by
    formulas above. You can glue it with other solutions
    at point where other solution is 0, so starting from
    0 initial condition you get infintely many solutions.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [email protected]@21:1/5 to [email protected] on Sun Jul 10 19:28:29 2022
    [email protected] schrieb:

    Nasser M. Abbasi <[email protected]> wrote:
    On 7/9/2022 1:43 AM, Dr Huang wrote:
    wolfram gives
    (c1-x)^2/x
    is it right? did it seem wrong? what is yours?


    Mathematica 13.1

    ClearAll[x, y]
    ode = x*y'[x] + y[x] == 2*(x*y[x])^(1/2);
    sol = DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

    gives

    {{y[x] -> (E^(C[1]/2) + x)^2/x}, {y[x] -> x}}

    The first is the general solution and the second is singular solution.

    The solution you give is a particular solution which satisfies the ode under the condition x>=C[1] only. You can see this by doing

    sol = y -> Function[{x}, (C[1] - x)^2/x]
    result = ode /. sol // FullSimplify

    Sqrt[(x - C[1])^2] + C[1] == x

    The above becomes identity when x >= C[1]

    Well, it depends on what Sqrt (or ^(1/2)). In general there
    are two square roots and in complex domain you can not
    really separate them, one will analytically continue to
    the other.

    AFAICS the (C[1] - x)^2/x is better. With complex C[1]
    writing E^(C[1]/2) is just obscure way of saying that we
    have arbitrary nonzero constant. This is even more obscure
    since replacing E^(C[1]/2) leads to valid solution. With
    real C[1] writing constat as E^(C[1]/2) excludes negative
    values and conseqently some solutions. And if you insist
    that argument to Sqrt must be positive, then you get
    restrictions on x anyway.

    BTW: AFAICS 0 is singular solution, not covered by
    formulas above. You can glue it with other solutions
    at point where other solution is 0, so starting from
    0 initial condition you get infintely many solutions.


    Using Derive 6.10 assuming default real variables:

    DSOLVE1_GEN(y - 2*SQRT(x*y), x, x, y, c)

    LN(SQRT(y/x) - 1) = - LN(x) - c

    Exponentiation gives:

    EXP(LN(SQRT(y/x) - 1)) = EXP(- LN(x) - c)

    SQRT(y/x) - 1 = EXP(-c)/x

    Manipulating for x >= 0 to recover the original SQRT(x*y):

    SQRT(x*y) = x + EXP(-c)

    where EXP(-c) = d can now be negative, but the real solution is
    obviously limited x >= -d, which may now also be negative. Checking the implicit solution:

    x*IMP_DIF(SQRT(x*y) - x - d, x, y) + y = 2*SQRT(x*y)

    true

    Alright. Finally solving for y is trivial:

    y = (x + d)^2/x

    but plugging this y(x) into the original ODE confirms that the solution
    is indeed limited to x >= -d.

    Martin.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)