# Minimize beats Reduce in solving transcendental equation

Posted 12 days ago
240 Views
|
3 Replies
|
4 Total Likes
|
 This problem was posted on LinkedIn In[1]:= Reduce[Log[5, x + 3] == Log[6, x + 14], x] During the evaluation of In[1]:= Reduce::nsmet: This system cannot be solved with the methods available to Reduce. Out[1]= Reduce[Log[3 + x]/Log[5] == Log[14 + x]/Log[6], x] In[2]:= Minimize[(Log[5, x + 3] - Log[6, x + 14])^2, x] Out[2]= {0, {x -> 22}} 
3 Replies
Sort By:
Posted 12 days ago
 Reduce[Log[5, x + 3] == Log[6, x + 14], x, Reals] (* x == 22 *) 
Posted 11 days ago
 I would not have expected that fixing the type of the variable would enable a solution.
Posted 10 days ago
 Some points about solving equations: Transcendental equations are, in general, difficult. Solving functions over regions on which they are analytic is easier. Solving functions over (bounded) regions on which they are analytic is even easier. The smaller the region the better. Reduce tries to prove the solution set is complete. It will complain if it has a set of solutions and cannot prove its completeness (Reduce::incs, INComplete Solution). On the other hand, Reduce may fail utterly (Reduce::nsmet, Not Solved by METHods); whether or not there is a connection to proving the completeness The are different algorithms available for solving over the complexes and for solving over the reals. In Reduce, an inequality like x > -3 is taken to imply that its terms are real; so "x is real" could be deduced if needed from x > -3. Inequalities like Re[x] > -3 or Im[x] < 1 do not imply x is real (just that Re[x] or Im[x] is real). The condition Im[x] == 0 allows the conclusion that x is real. In specifying a domain like Reals in Reduce[Log[5, x+3]..., x, Reals], both the variables and the function values are assumed to be real, which is usually more restrictive than just "x is real." Examples:We know that Reduce fails when the domain is the default Complexes and succeed when the domain is Reals. The equation has singularities, two logarithmic poles and a branch cut on the real axis to the left of -3: FunctionSingularities[Log[5, x + 3] - Log[6, x + 14], x, Complexes] (* x == -14 || x == -3 || (Im[x] == 0 && Re[x] <= -3) *) Specifying the domain Reals implies x > -3 (in order for Log[5, x + 3] to be real), something to keep in mind in the examples below.Below we show a series of examples, with x restricted to a bounded region (B) and x unbounded (U); some over complex x (C) and some over real (R); and with the singularity at x == -3 (S) in the region, on the boundary, and outside the region. All produce the solution x == 2 except the one that FAILS. Examples 1, 2, and 7 produce the Reduce::incs message that the solution set could not be proved complete. Example 7 will be discussed at the end. (*1*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* B, C, S in region: Reduce::incs *) -100 < Im[x] < 100 && -100 < Re[x] < 100, x] (*2*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* B, C, S on boundary: Reduce::incs *) -100 < Im[x] < 100 && -3 < Re[x] < 100, x] (*3*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* B, C, S outside boundary *) -100 < Im[x] < 100 && -3 + 10^-1000 < Re[x] < 100, x] (*4*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* B, R, S on boundary *) Im[x] == 0 && -3 < Re[x] < 100, x] (*5*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* U, R, S in region: FAILS *) -4 < x, x] (*6*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* U, R, S on boundary *) -3 < x, x] (*7*)Reduce[Log[5, x + 3] == Log[6, x + 14] && (* B, C, S on boundary: Reduce::incs *) 0 < Im[x] < 100 && -3 < Re[x] < 100, x] (* N.B. 0 < Im[x] implies NO solutions *) Examples 4 and 6 are mathematically equivalent and also equivalent to specifying the domain to be Reals. I don't know whether Reduce takes the same steps or uses different algorithms to reach the same conclusion in these cases.The difference in examples 2 and 3 is significant. The singularity being ever so slightly outside the region means that the solution set can be proved to be complete. This is because the number of roots can be counted if a function is meromorphic on the region (including boundary). Compare CountRoots[Log[x], {x, 0 - I, 2 + I}] and CountRoots[Log[x], {x, 10^-1000 - I, 2 + I}]. It turns out that the bounds on Im[x] are irrelevant unless the constraint is Im[x] == 0 or the constraint excludes Im[x] == 0. Note in example 7 we still get an incomplete solution set warning since the singularities are on the boundary.