0
$\begingroup$

I have two questions:

(1) I found the global maximum point of the following function

FindMaximum[(Exp[-x^2/18]/3 + Exp[-(x - 5)^2/2] + 
    Exp[-(x - 15)^2/8]/2)*(1 + x^2)*Pi/(3 Sqrt[2 Pi]), {x, 15}]

but I can't plot the maximum point.

(2) I tried to solve the first-order nonlinear differential equation:

DSolve[{x^2 y'[x]+x y[x]==Exp[-x y[x]],y[1]==0},y[x],x]

but I can't get the solution. Then, I have to plot the solution.

$\endgroup$
2
$\begingroup$
f[x_] := (Exp[-x^2/18]/3 + Exp[-(x - 5)^2/2] + Exp[-(x - 15)^2/8]/2)*(1 + 
    x^2)*Pi/(3 Sqrt[2 Pi])

max = FindMaximum[f[x], {x, 15}]

(* {48.8444, {x -> 15.5135}} *)

Plot[f[x], {x, 0, 20},
 Epilog -> {Red, AbsolutePointSize[4],
   Tooltip[Point[{x, f[x]}], {x, f[x]}] /. max[[2]]}]

enter image description here

eqn = {x^2 y'[x] + x y[x] == Exp[-x y[x]], y[1] == 0};

sol = DSolve[eqn, y, x][[1]] // Quiet

(* {y -> Function[{x}, Log[1 + Log[x]]/x]} *)

Verifying,

eqn /. sol // Simplify

{* {True, True} *)

FunctionDomain[y[x] /. sol, x]

(* x > 1/E *)

max2 = NMaximize[{y[x] /. sol, x > 1/E}, x]

(* {0.26438, {x -> 2.14518}} *)

Limit[y[x] /. sol, x -> Infinity]

(* 0 *)

Plot[y[x] /. sol, {x, 0.5, 10},
 PlotRange -> {-0.5, 0.3},
 Epilog -> {Red, AbsolutePointSize[4],
   Tooltip[Point[{x, y[x]}], {x, y[x]}] /. sol /. max2[[2]]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.