# Update

Using

Manipulate[Plot[{(LogIntegral[x])^(1/2),
(((x*E^s)/Log[x*E^s]) ((((Log[Log[x*E^s]])^(w - 1))/((w - 1)!))))/
RiemannR[x]}, {x, 2, 5000}, PlotStyle -> {Blue,Red}, ImageSize -> 700],
{w, 33.34, 40, 0.01}, {s, 43.2, 50, 0.01}]


to play with the plot

I am trying to find the max values of w and s where the $y$-value of the red curve is at no point greater in value that of the blue curve (for any $x$). Is there a better way of doing this?

(I have started w and s at a reasonable estimate, but when values become much higher than $1000$, manipulation is not really feasible.)

N.B. My best guess so far at the relationship between s and w is s=[N[Log[((w/5) + 1)!]], but this is clearly way off.

# Original question

Which approach would be the best to take in order to calculate the max value of $a$, where $a\log(x+1)$ at no point exceeds $\sqrt{x}$?

Plot[{a Log[x + 1], Sqrt[x]}, {x, 0, 100}, PlotStyle -> {Blue, Red}]


I have tried using Manipulate to get a rough guess, but I am really searching for a more accurate approach.

• Try Manipulate[ Plot[{a Log[x + 1], Sqrt[x]}, {x, 0, 100}, PlotStyle -> {Blue, Red}], {a, 1, 10}] – Artes Dec 11 '13 at 14:11
• Yes - I have done - that is how I got this :/ - It is not exact though & relies on trial & error – martin Dec 11 '13 at 14:12
• I have changed the post accordingly. – martin Dec 11 '13 at 14:19
• Graphs always intersect since near zero Log increases faster than Sqrt, but for larger x Sqrt exceeds Log. You should play e.g. with Series[#, {x, 0, 5}] & /@ {Log[x + 1], Sqrt[x]} or with Manipulate[ Plot[{a Log[x + 1], Sqrt[x]}, {x, 0, b}, PlotStyle -> {Blue, Red}], {a, 1, 10}, {b, 0.5, 100}]. – Artes Dec 11 '13 at 14:29
• Thanks for the Series suggestion- looks promising :) – martin Dec 11 '13 at 14:49

(This is an answer to the original question)

After playing a bit with

f[x_,a_]:=Sqrt[x] - a Log[1 + x];
Manipulate[Plot[f[x, a], {x, 0, 10}, PlotRange -> {-.2, 1/2}], {a, 0, 2}]


you see you want both f and its derivative wrt x == 0. However, trying

Solve[Sqrt[x] - a Log[1 + x] == 0 && D[Sqrt[x] - a Log[1 + x], x] == 0, {x, a}]


does not work ("This system cannot be solved with the methods available to Solve"). Still, solving twice for "a" yields

a1 = a /. Solve[Sqrt[x] - a Log[1 + x] == 0, {a}] // First
a2 = a /. Solve[D[Sqrt[x] - a Log[1 + x], x] == 0, {a}] // First


with output

Sqrt[x]/Log[1 + x]
(1 + x)/(2 Sqrt[x])


The x is

xx = Solve[a1 == a2, {x}][[1, 1]] // N (* remove "//N" if you like *)


output :

x -> 3.92155


and a is

a1 /. xx


output :

1.24263


ps. I would very much like to know why the first attempt to solve for both $x$ and $a$ does not work while doing it step by step does. Any suggestion ?