|
From: Matthias A. S. <mat...@we...> - 2026-03-06 05:42:29
|
Dear Barton,
thanks for your suggestion. I tried to apply the first in 1.0.6 (see below). For aesthetic reasons, formatting issues in the TeXmacs maxima-plugin, I didn’t go for the alternative. Here’s how the program behaves now:
(%i1) kill(all)$
(%i1) load("all_exp_eq_solutions_v1.0.6.mac")$
(%i2) eq1: 5^(3*x+2) = 7^(3*x+2)$
(%i3) sols1: all_solutions(eq1, x)$
(%i4) real(eq1, x);
(%o4) x=-(2/3)
(%i5) complex(eq1, x);
(%o5) x=-((2*i*π*k)/(3*log (7/5)))-2/3
(%i6) complex_report(eq1, x);
(%o6) [x=-((2*i*π*k+2*log (7)-2*log (5))/(3*log (7)-3*log (5))),x=-((2*i*π*k)/(3*log (7/5)))-2/3]
(%i7) eq2: 5^(3*k+2) = 7^(2*k+2)$
(%i8) sols2: all_solutions(eq2, k)$
(%i9) real_solution(eq2, k);
(%o9) k=-((2*log (7)-2*log (5))/(2*log (7)-3*log (5)))
(%i10) complex(eq2, k);
(%o10) k=-((2*i*π*kk+2*log (7)-2*log (5))/(2*log (7)-3*log (5)))
(%i11) complex_report(5^(3*k+2) = 7^(3*k+2), k);
(%o11) [k=-((2*i*π*kk+2*log (7)-2*log (5))/(3*log (7)-3*log (5))),k=-((2*i*π*kk)/(3*log (7/5)))-2/3]
(%i12) eq3: 5^(3*x+2) = 7^(2*x+1)$
(%i13) sols3: all_solutions(eq3, x)$
(%i14) real_solution(eq3, x);
(%o14) x=-((log (7)-2*log (5))/(2*log (7)-3*log (5)))
(%i15) complex_solution(eq3, x);
(%o15) x=-((2*i*π*k+log (7)-2*log (5))/(2*log (7)-3*log (5)))
(%i16) complex_report(eq3, x);
(%o16) x=-((2*i*π*k+log (7)-2*log (5))/(2*log (7)-3*log (5)))
(%i17) complex(5^(3*x+2) + 1 = 7^(3*x+2), x);
#0: complex_solution(eq=5^(3*x+2)+1 = 7^(3*x+2),x=x) (all_exp_eq_solutions_v1.0.6.mac line 161)
#1: complex(eq=5^(3*x+2)+1 = 7^(3*x+2),x=x) (all_exp_eq_solutions_v1.0.6.mac line 181)
all_solutions: expected LHS to be a power of a^u. Got LHS = 5^(3*x+2)+1
-- an error. To debug this try: debugmode(true);
(%i18) try_complex(5^(3*x+2) + 1 = 7^(3*x+2), x);
all_solutions: expected LHS to be a power of a^u. Got LHS = 5^(3*x+2)+1
(%o18) unsolved
(%i19) k: %pi/6$
(%i20) eq1: 5^(3*x+2) = 7^(3*x+2)$
(%i21) complex_solution(eq1, x);
(%o21) x=-((2*i*π*k)/(3*log (7/5)))-2/3
(%i22) try_complex(5^(3*x+2)+1 = 7^(3*x+2), x);
all_solutions: expected LHS to be a power of a^u. Got LHS = 5^(3*x+2)+1
(%o22) unsolved
Cheers, Tilda

> Am 05.03.2026 um 18:44 schrieb Barton Willis <wi...@un...>:
>
> I think your code should quote k, kk, kkk and unsolved. Otherwise:
>
> %i5) k : %pi/6$
>
> (%i6) eq1 : 5^(3*x+2) = 7^(3*x+2);
> (eq1) 5^(3*x+2)=7^(3*x+2)
>
> (%i7) complex_solution(eq1, x);
> (%o7) x=-((%i*%pi^2)/(9*log(7/5)))-2/3
>
> Alternatively, you might like to consider using a gensym variable (see user documentation).
>
|