2
$\begingroup$

I need to find a,b,c,d but solve or solveAlways isn't working. The code I tried was: SolveAlways[2 b Log[-1 + (3 (x - c))/a] - 4 b + d == Log[x], {a, b, c, d}] The output I got was: {{Log[-1 + (3 (-c + x))/a] -> -1}, {}}

$\endgroup$
6
$\begingroup$

Your call to SolveAlways asks Mathematica to find values for x such that the equation holds for all possible values of a, b, c and d which does not help with the question.

To solve for a, b, c and d in terms of x you can ask for the most generic solution with

eqn = -4*b + d + 2*b*Log[-1 + (3*(-c + x))/a] == Log[x]
Reduce[eqn, {a,b,c,d}]

which is only able to give a condition on d that is not too helpful

d == 4*b + Log[x] - 2*b*Log[-1 + (3*(-c + x))/a]

The inability of Reduce to find solutions comes from the fact that by default it assumes all variables to be complex. If we restrict all variables to the reals

Reduce[eqn, {a,b,c,d}, Reals]

we get

  ((x > 0 && a < 0 && c > (-a + 3*x)/3) 
|| (x > 0 && a > 0 && c < (-a + 3*x)/3))
&& d == 4*b + Log[x] - 2*b*Log[-1 + (3*(-c + x))/a]

This means there are two cases that yield real solutions. Either the thre variables a, c and x satisfy

(x > 0 && a < 0 && c > (-a + 3*x)/3)

or they satisfy

(x > 0 && a > 0 && c < (-a + 3*x)/3)

In both cases, the remaining variables d and x have then the following relation:

d == 4*b + Log[x] - 2*b*Log[-1 + (3*(-c + x))/a]

For given a, c and x this is a line through the origin in the plane. We therefore have infinitely many solutions in the reals even if we fix a, c and x. If you want to find particular solutions, you can use FindInstance:

FindInstance[eqn, {a,b,c,d,x}, Reals]

{{a -> 10180463/7817650,
  b -> 1707599/480297768,
  c -> 31579484/44042967, 
  d -> 24304835/123489551, 
  x -> Root[{2707518866729021/14827938929155542 + (1707599*Log[-1 + (23452950*(-31579484/44042967 + #1))/10180463])/240148884 - Log[#1] & , 1.17627114050737935357915375789161771536`15.15051499783199}]
}}
$\endgroup$
1
  • $\begingroup$ plus 1 for time spend to answer this question $\endgroup$ – Lou Jun 6 at 12:26
5
$\begingroup$

Up to the documentation, "SolveAlways works primarily with linear and polynomial equations". In view of it, we will work with the quantifier ForAll instead of SolveAlways. We consider the identity over the positive reals at the beginning. If two expressions are equal, then their derivatives are equal too:

ForAll[x, x > 0, D[2 b Log[-1 + (3 (x - c))/a] - 4 b + d, x] == D[Log[x], x]];
Resolve[%, Reals]

b == 1/2 && a + 3 c == 0

Next, we substitute the above in the LHS of the identity

2 b Log[-1 + (3 (x - c))/a] - 4 b + d /. {b -> 1/2, a -> -3 c}

-2 + d + Log[-1 - (-c + x)/c]

and use ForAll again

ForAll[x, x > 0, -2 + d + Log[-1 - (-c + x)/c] == Log[x]];Resolve[%, Reals]

c < 0 && d == 2 - Log[-(1/c)]

At last, if two analytic functions are equal on on the positive ray of the complex plane, then these functions coinside on their domain over the complexes, i.e. x != 0 in the case under consideration.

$\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.