|
From: Stavros M. <mac...@gm...> - 2025-11-13 17:54:17
|
As Barton suggests, *solve* is weak in many ways. His *%solve *(in *to_poly_solve*) is more powerful in many ways, but not all. Some simple cases that neither one handles: * *x!=0* ** x!=120* * *sin(x)=x* ** 2^x=5^x* * *7*2^x=5^x* Many of these have easy solutions and also hard solutions with no closed form. (Usually complex, but even some real ones: consider *x!* for *x<0* for example.) Many users would be delighted for *solve *to find the easy solutions, even if it can't find the hard solutions. Tested in 5.48 SBCL 2.5.7 MacOS On Thu, Nov 13, 2025 at 10:39 AM Barton Willis via Maxima-discuss < max...@li...> wrote: > > The Maxima solve function needs improvement. Please don't get the > impression that setting an obscure variable will fix all its shortcomings. > Maybe somebody should experiment with making the default of solveradcan > true. > --Barton > > ------------------------------ > *From:* richard christian <rp...@cl...> > *Sent:* Thursday, November 13, 2025 5:33 AM > *To:* Barton Willis <wi...@un...> > *Cc:* max...@li... < > max...@li...> > *Subject:* Re: [Maxima-discuss] elementary solve() problem > > Caution: Non-NU Email > > > Terrific. Thank you, Barton. > And needless to say, apologies for the accidental repetition in the > first 6 lines of my example... > > rc > > On 2025-11-13 11:23, Barton Willis wrote: > > Try setting the option variable solveradcan to true before solving: > > > > (%i1) solveradcan : true$ > > > > (%i2) solve(n*10^(n-1)=2*n*5^(n-1),n); > > (%o2) [n=0,n=2] > > > > Alternatively, apply radcan before solving: > > > > (%i1) radcan(n*10^(n-1)=2*n*5^(n-1)); > > (%o1) 2^(n-1)*5^(n-1)*n=2*5^(n-1)*n > > > > (%i2) solve(%,n); > > (%o2) [n=0,n=2] > > > > For a list of additional option variables (and a bunch of other > > stuff) that affect how solve works, try > > > > (%i3) apropos (solve); > > > > (%o3) > [desolve,funcsolve,globalsolve,linsolve,linsolve_by_lu,linsolve_params,linsolvewarn,solve,solve_congruences,solvedecomposes,solveexplicit,solvefactors, > > > > Solvenullwarn,solveradcan,solvetrigwarn,tmlinsolve,to_poly_solve] > > > > Thanks for your interest in Maxima! If you have more questions, feel > > free to ask. > > > > --Barton > > > > ------------------------- > > > > From: richard christian <rp...@cl...> > > Sent: Thursday, November 13, 2025 3:57 AM > > To: max...@li... > > <max...@li...> > > Subject: [Maxima-discuss] elementary solve() problem > > > > Caution: Non-NU Email > > > > Apologies for this very novice question, but what am I doing wrong > > here? > > Why isn't Maxima giving n=2? > > > > (%i18) s: t**n; > > (s) t^n > > (%i19) diff(s,t); > > (%o19) n*t^(n-1) > > (%i20) s: t**n; > > (s) t^n > > (%i21) diff(s,t); > > (%o21) n*t^(n-1) > > (%i23) ev(%,t=10) = 2*ev(%,t=5); > > (%o23) n*10^(n-1)=2*n*5^(n-1) > > (%i24) solve(%,n); > > (%o24) [n=0,10^(n-1)=2*5^(n-1)] > > > > Many thanks, Richard > > > > _______________________________________________ > > Maxima-discuss mailing list > > Max...@li... > > > https://urldefense.com/v3/__https://lists.sourceforge.net/lists/listinfo/maxima-discuss__;!!PvXuogZ4sRB2p-tU!AHGAk7NlanJPbiPzOCvfT6cKkVSALivLV8W_2kJZ_1zbIZSyVluWjP4HKlQV7DKLKiC8HDD9EecjLylJKPE$ > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |