ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 14 May 2023 17:03:42 +0200Is there a way to optimize this equation-solving code to run in a reasonable timeframe?https://ask.sagemath.org/question/68436/is-there-a-way-to-optimize-this-equation-solving-code-to-run-in-a-reasonable-timeframe/ I have the following lines in Sage:
var('A, B, C, E, α, β, γ, d')
f = lambda n : (
(12*A + 6*B + 4*C + 2*E + 4*α + 2*β + γ)^n
- (11*A + 6*B + 4*C + 2*E + 4*α + 2*β + γ)^n
- (11*A + 5*B + 4*C + 2*E + 4*α + 2*β + γ)^n
+ (10*A + 5*B + 4*C + 2*E + 4*α + 2*β + γ)^n
- (10*A + 5*B + 3*C + 2*E + 4*α + 2*β + γ)^n
+ ( 9*A + 5*B + 3*C + 2*E + 4*α + 2*β + γ)^n
+ ( 9*A + 4*B + 3*C + 2*E + 4*α + 2*β + γ)^n
- ( 8*A + 4*B + 3*C + 2*E + 4*α + 2*β + γ)^n
- ( 8*A + 4*B + 3*C + E + 4*α + 2*β + γ)^n
+ ( 7*A + 4*B + 3*C + E + 4*α + 2*β + γ)^n
+ ( 7*A + 3*B + 3*C + E + 4*α + 2*β + γ)^n
- ( 6*A + 3*B + 3*C + E + 4*α + 2*β + γ)^n
+ ( 6*A + 3*B + 2*C + E + 4*α + 2*β + γ)^n
- ( 6*A + 3*B + 2*C + E + 3*α + 2*β + γ)^n
- ( 6*A + 3*B + 2*C + E + 3*α + β + γ)^n
+ ( 6*A + 3*B + 2*C + E + 2*α + β + γ)^n
- ( 6*A + 3*B + 2*C + E + 2*α + β)^n
+ ( 6*A + 3*B + 2*C + E + α + β)^n
+ ( 6*A + 3*B + 2*C + E + α)^n
- ( 6*A + 3*B + 2*C + E)^n
+ ( 6*A + 3*B + C + E)^n
- ( 5*A + 3*B + C + E)^n
- ( 5*A + 2*B + C + E)^n
+ ( 4*A + 2*B + C + E)^n
+ ( 4*A + 2*B + C)^n
- ( 3*A + 2*B + C)^n
- ( 3*A + B + C)^n
+ ( 2*A + B + C)^n
- ( 2*A + B)^n
+ ( A + B)^n
+ A^n
)/factorial(n)
solve([f(3) == 0, f(4) == 0, f(5) == d], α, β, γ)
I want Sage to solve this system of equations for the three Greek-letter variables in terms of the five English-letter variables. However, when I ask Sage to solve this, it just sits and spins at maximum CPU usage and steadily-increasing RAM usage until I kill the process. I've waited over fifteen minutes without it completing.
Are there any ways to make this more performant?ZLSun, 14 May 2023 17:03:42 +0200https://ask.sagemath.org/question/68436/mpmath not working with sage equationshttps://ask.sagemath.org/question/60577/mpmath-not-working-with-sage-equations/I'm trying to get a numerical solution to a problem similar to the one discussed in [this old post](https://ask.sagemath.org/question/8546/numerical-solution-of-a-system-of-non-linear-equations/) but somewhat messier -- there are decimals and the variables to solve for are in an exponent. I ran the example given in the old post, with som syntactical updating and using `import mpmath as mp` and everything works exactly as shown. But when I switch to my problem, I get a "TypeError: cannot evaluate symbolic expression numerically" error. What's the difference between the two cases and what should I do? I've tried changing ^ to ** and restarting the kernel.
Here's my code:
import mpmath as mp
var("Vmax,Km")
eq0 = 101/4563863823**(32.4*Vmax/Km) - 71.85 == 0
eq1 = 96.3/85080567**(2.4*Vmax/Km) - 74.25 == 0
f = [lambda Vmax,Km: eq0.lhs().subs(Vmax=RR(Vmax), Km=RR(Km)),
lambda Vmax,Km: eq1.lhs().subs(Vmax=RR(Vmax), b=RR(Km))]
found_root = mp.findroot(f, (2, 2))
found_root = Matrix(RR, found_root.tolist())
print(found_root)
fa,fb = found_root.list()
#Check results
print(eq0.subs(Vmax=fa,Km=fb))
print(eq1.subs(Vmax=fa,Km=fb))
jaiaSat, 08 Jan 2022 09:14:05 +0100https://ask.sagemath.org/question/60577/Solving equationhttps://ask.sagemath.org/question/59316/solving-equation/ To encourage buyers to place 100-unit orders, your firm’s sales department applies a continuous discount that makes the unit price as a function P(x) of the number of unites ordered. The discount decreases the prices at the rate EUR 0.01 per unit ordered. The price per unit for a 100-unit order is P(100) = 20.09 EUR.
(a) Find P(x) by solving the equation
P′(x) = − 1/100 P(x), P(100) = 20.09.
(b) Find the unit price P(10) for a 10-unit order and P(90) for a 90-unit order.
(c) The sales department has asked you to find out if it is discounting so much that the firm’s revenue, r(x) = xP(x), will actually be less for a 100-unit order than, say, for a 90-unit order. Reassure them by showing that r(x) has its maximum value at x = 100.
(d) Graph the revenue function r(x) = xP(x) for 0 ≤ x ≤ 200.JCMSun, 10 Oct 2021 16:42:46 +0200https://ask.sagemath.org/question/59316/Weird c-values from solving system of equationshttps://ask.sagemath.org/question/59063/weird-c-values-from-solving-system-of-equations/Here is the issue:
sage: a_1, a_2, b_1, b_2 = var('a_1 a_2 b_1 b_2')
sage: eq1 = a_1 * a_2^2 - a_2 * a_1^3 == 0
sage: eq2 = 2*a_1*a_2*b_2 + b_2*a_2^2 - 3*a_2*a_1^2*b_1 - a_1*b_2
sage: eq3 = a_2^3 - a_2^2*a_1^2
sage: eq4 = 3*a_2^2*b_2 - 2*a_2*a_1^2*b_2 - 2*a_2^2*b_1
sage: solve([eq1, eq2, eq3, eq4], a_1, a_2, b_1, b_2)
[[a_1 == 0, a_2 == 0, b_1 == c2439, b_2 == c2440], [a_1 == c2441, a_2 == 0, b_1 == c2442, b_2 == 0], [a_1 == c2443, a_2 == c2443^2, b_1 == 0, b_2 == 0]]
im getting these weird c2439 and c2440 solutions, are they just arbitrary complex numbers? Shouldn't they rather be prefixed with 'r' in that case? Can anyone tell me what these c-values are?arneoviThu, 16 Sep 2021 14:52:20 +0200https://ask.sagemath.org/question/59063/Solving equations in SageMathhttps://ask.sagemath.org/question/58055/solving-equations-in-sagemath/Hey! I'm new to sage and I'm trying to see how complex are the calculations that I can express in SageMath. So I considered the following example, the comparison between the likelihood of two normals with different means but same variance:
$$ \dfrac{1}{\sigma\sqrt{2\pi} } \exp{\left(-\dfrac{(x-\mu_1)^2}{2\sigma^2}\right)} = \dfrac{1}{\sigma\sqrt{2\pi} } \exp{\left(-\dfrac{(x-\mu_2)^2}{2\sigma^2}\right)} $$
I know that the answer must be $\mu_1 = \mu_2$. Can I solve it with SageMath? I tried:
x, mu1, mu2, sigma = var('x, mu1, mu2, sigma')
exp((0.5/sigma)*(x-mu1)^2)==exp((0.5/sigma)*(x-mu2)^2)
and
solve(exp((0.5/sigma)*(x-mu1)^2)==exp((0.5/sigma)*(x-mu2)^2))
but that doesn't seem to work. Is it possible to do so in sagemath? Thanks!! YetAnotherUsrMon, 19 Jul 2021 21:16:32 +0200https://ask.sagemath.org/question/58055/Solve returns bad resultshttps://ask.sagemath.org/question/55395/solve-returns-bad-results/ I'm trying to use Sage to determine if a collection of (polynomial) inequalities has a solution or not. Ideally, I think I should use qepcad but I am having problems getting it to install. I thought I would try to see if standalone Sage would do the trick and began working with the solve function to get familiar with it. Already I'm running into very weird results. For example I run the following code:
x,y = var('x,y')
circ = x**2 + y**2 == 1
line = y == x
badIneq = y > 1
Now, if I execute
solve([circ, line], x)
it returns [] instead of the two solutions I expect. Furthermore, the code
assume(x,'real')
assume(y,'real')
solve([circ, badIneq], x)
is expected to return no solutions but instead it returns [[y - 1 > 0, x^2 + y^2 - 1 == 0]].
I must be doing something wrong but I can't figure out what it is. Thanks.
skepleyWed, 20 Jan 2021 19:04:12 +0100https://ask.sagemath.org/question/55395/How to solve numericaly with arbitrary precisionhttps://ask.sagemath.org/question/50197/how-to-solve-numericaly-with-arbitrary-precision/Hello,
I want to solve a numerical equation for which I can only access by a lambda function, the M matrix is to big for the determinant to be computed on the symbolic ring.
f = lambda om: RRR(M.subs({omega:om}).change_ring(RRR).det())
But , find-root solve in the built in float type of Python which is lacking the precision I need. Is there a way in sage to solve numericaly with arbitrary precision?
Thank you
Regards
*(edited with example more in line with what I am trying to achieve)*
sage: x=var('x')
sage: M= Matrix(SR,[[cos(x),cosh(x)],[sin(x),sinh(x)]])
sage: RRR = RealField(200)
sage: f = lambda om: M.subs({x:om}).change_ring(RRR).det()
sage: find_root(f,1,2)JonasAMon, 09 Mar 2020 10:19:57 +0100https://ask.sagemath.org/question/50197/Solving two-variate polynomial identities https://ask.sagemath.org/question/9674/solving-two-variate-polynomial-identities/Hi, some help is appreciated concerning the following search.
Suppose **P1**,**P2**,**P3** are two-variate polynomials with integer coefficients in A,B. I'm searching for all sets (**P1**,**P2**,**P3**) such that:
i) **P1**(A,B)+**P2**(A,B)=**P3**(A,B)
ii) Greatest common denominator **P1** and **P2** equals 1 (Thus gcd( **P1**,**P2** )=1)
iii) The product **P1** * **P2** * **P3** can be divided by AB(A+B) (Thus gcd( **P1**.**P2**.**P3**, AB(A+B) )=AB(A+B))
Some well-known identities are A^2 + B(2A+B) = (A+B)^2, (B-A)^2 + 4AB = (A+B)^2 and
(A+2B)A^3 + B(2A+3B)^3 = (A+B)(A+3B)^3. Most interesting are polynomials with *only* linear factors such as: 16(A+B)B^3 + A(3A+4B)^3+(A+2B)(3A+2B)^3 and 27(B-A)(A+B)^5 + (3A+2B)A^3(3A+5B)^2 = (2A+3B)B^3(5A+3B)^2.
I'm curious if via Sage one could develop a generating algorithm (maybe there is a connection to Graphs and/or Combinatorics ...). N.B.: A [related question](http://ask.sagemath.org/question/1452/polynomial-identity) was raised earlier.
Thanks in advance for any support!
RolandRolandbTue, 01 Jan 2013 14:49:28 +0100https://ask.sagemath.org/question/9674/Solving a system of 5 polynomial equationshttps://ask.sagemath.org/question/40346/solving-a-system-of-5-polynomial-equations/I have a system of 5 polynomial equations. I solved the equations in Maple but I'm trying to solve them also in sagemath since it's open source. I've been trying for a long time (weeks) and still couldn't solve the equations in sagemath (Maple finds all the solutions in 10 seconds). I don't need the complex solutions (if exist). only the real solutions.
I have posted before a similar question but with 18 equations and it took Maple 40 minutes to solve them. But since then I was able to reduce the number of equations from 18 to 5. This time Maple solved the equations much faster (10 seconds instead of 40 minutes). But unfortunately, still can't solve the equations with sagemath.
The goal is to find all the possible (real) solutions of the equations. Maple did it and found 20 solutions (the code is attached bellow). But I wasn't able to solve the equations in sagemath at all (I attached the code for sagemath bellow as well).
I tried to use groebner basis in sagemath but there are so many different implementations with different order of the polynomials ('lex', 'degrevlex',etc). I tried many of them and none of them could solve the equations.
I will appreciate if anyone can suggest other ways to solve the equations. Maybe not groebner? any method that works and returns all the 20 solutions.
This is the code in Maple that defines the 5 equations and finds all the solutions:
restart;
eq1:=-18889.48706*qd+467.29186*qb+2982.844413*qd*qc*qb+30136.14351*qc-1115.07186*qc^2*qd-45629.75749*qa*qd*qb-23697.88597*qd^2*qc+4316.66628*qa*qc*qb-15135.14056*qb^2*qc-21851.63993*qa*qd*qc+7902.042467*qb^2*qd-5483.40637*qd^2*qb-11776.45729*qc^2*qb+40621.75090*qa+11348.58548*qd^3-18144.72833*qb^3-19544.23125*qc^3+2*b*qa+32521.65211*qa*qc^2+25623.87525*qa*qd^2+26225.65173*qa*qb^2;
eq2:=-29579.52853*qd+73144.02842*qb+8748.09605*qd*qc*qb+2240.035087*qc+26343.71460*qc^2*qd+2344.316752*qa*qd*qb-25331.91138*qd^2*qc+1444.808993*qa*qc*qb+6290.87549*qb^2*qc+2982.844337*qa*qd*qc+49189.98407*qb^2*qd-29432.25353*qd^2*qb-17559.89085*qc^2*qb-7338.23254*qa+2*b*qb+21944.51817*qd^3-11930.76271*qb^3+2394.88100*qc^3-3970.93290*qa*qc^2+2322.11803*qa*qd^2-23212.08740*qa*qb^2;
eq3:=-3375.795773*qd+2240.03510*qb+7057.67167*qd*qc*qb+56197.14569*qc+52577.03189*qc^2*qd+2982.84431*qa*qd*qb-17977.24342*qd^2*qc-136.341409*qa*qc*qb-23855.89112*qb^2*qc-15689.91200*qa*qd*qc+15299.86799*qb^2*qd-25331.91138*qd^2*qb+11501.30926*qc^2*qb+19564.44679*qa-963.74805*qd^3+658.069730*qb^3-24654.25363*qc^3-16345.90692*qa*qc^2-13126.18932*qa*qd^2-4563.44385*qa*qb^2+2*b*qc;
eq4:=37246.67872*qd-29579.52855*qb-46347.15644*qd*qc*qb-3375.795773*qc-11079.46666*qc^2*qd+12449.76046*qa*qd*qb-24742.88407*qd^2*qc+2982.844222*qa*qc*qb+15299.86800*qb^2*qc-15680.68187*qa*qd*qc-28830.47715*qb^2*qd+20203.79697*qd^2*qb+26343.71462*qc^2*qb-14402.89763*qa-14953.58829*qd^3+31606.58056*qb^3+24809.55728*qc^3-5601.66129*qa*qc^2+16099.39874*qa*qd^2+3415.45305*qa*qb^2+2*b*qd;
eq5:=qa^2+qb^2+qc^2+qd^2-1;
vars:=[b, qa, qb, qc, qd];
polysys:={eq1,eq2,eq3,eq4,eq5};
sols:=CodeTools:-Usage(RootFinding:-Isolate(polysys, vars, output = numeric, method = RS));
These are all the solutions that Maple found (20 solutions):
sols :=
[[b = -6104.435348, qa = -.2144080500, qb = -.2880353207, qc = -.1836576407, qd = -.9150599506],
[b = -12366.14419, qa = -.5402828747, qb = -.3634451559, qc = .1841090309, qd = -.7362784111],
[b = -24212.37926, qa = .2546299302, qb = .6836963191, qc = -.4499174642, qd = -.5150701091],
[b = -23961.92853, qa = .2585879982, qb = .7021280140, qc = -.4278033463, qd = -.5070826324],
[b = -6007.960508, qa = -.3010769760, qb = -.1196072448, qc = .8107192013, qd = -.4876280735],
[b = -22102.25884, qa = .7018528580, qb = -.1525453855, qc = -.5362892523, qd = -.4433128793],
[b = -26791.96626, qa = .3384082623, qb = -.1163579699, qc = -.8287561155, qd = -.4302371112],
[b = -26003.78615, qa = 0.7746836766e-1, qb = -.1265934010, qc = -.9030243373, qd = -.4031374569],
[b = -27290.86178, qa = .3563297191, qb = .8341751821, qc = .4195778650, qd = -0.3369439196e-1],
[b = -39895.97736, qa = -.5758752754, qb = .7983140794, qc = -.1758240948, qd = -0.1217314478e-1],
[b = -39895.97736, qa = .5758752754, qb = -.7983140794, qc = .1758240948, qd = 0.1217314478e-1],
[b = -27290.86178, qa = -.3563297191, qb = -.8341751821, qc = -.4195778650, qd = 0.3369439196e-1],
[b = -26003.78615, qa = -0.7746836766e-1, qb = .1265934010, qc = .9030243373, qd = .4031374569],
[b = -26791.96626, qa = -.3384082623, qb = .1163579699, qc = .8287561155, qd = .4302371112],
[b = -22102.25884, qa = -.7018528580, qb = .1525453855, qc = .5362892523, qd = .4433128793],
[b = -6007.960508, qa = .3010769760, qb = .1196072448, qc = -.8107192013, qd = .4876280735],
[b = -23961.92853, qa = -.2585879982, qb = -.7021280140, qc = .4278033463, qd = .5070826324],
[b = -24212.37926, qa = -.2546299302, qb = -.6836963191, qc = .4499174642, qd = .5150701091],
[b = -12366.14419, qa = .5402828747, qb = .3634451559, qc = -.1841090309, qd = .7362784111],
[b = -6104.435348, qa = .2144080500, qb = .2880353207, qc = .1836576407, qd = .9150599506]]
And this is the code in sagemath that I couldn't solve. Same equations as before, only converted them to rational coefficients using eq_i=P(eq_i). It is stuck in the last line of code (I.variety(RR)).
P.<b, qa, qb, qc, qd>=PolynomialRing(QQ,order='degrevlex')
eq1=-18889.48706*qd+467.29186*qb+2982.844413*qd*qc*qb+30136.14351*qc-1115.07186*qc^2*qd-45629.75749*qa*qd*qb-23697.88597*qd^2*qc+4316.66628*qa*qc*qb-15135.14056*qb^2*qc-21851.63993*qa*qd*qc+7902.042467*qb^2*qd-5483.40637*qd^2*qb-11776.45729*qc^2*qb+40621.75090*qa+11348.58548*qd^3-18144.72833*qb^3-19544.23125*qc^3+2*b*qa+32521.65211*qa*qc^2+25623.87525*qa*qd^2+26225.65173*qa*qb^2
eq2=-29579.52853*qd+73144.02842*qb+8748.09605*qd*qc*qb+2240.035087*qc+26343.71460*qc^2*qd+2344.316752*qa*qd*qb-25331.91138*qd^2*qc+1444.808993*qa*qc*qb+6290.87549*qb^2*qc+2982.844337*qa*qd*qc+49189.98407*qb^2*qd-29432.25353*qd^2*qb-17559.89085*qc^2*qb-7338.23254*qa+2*b*qb+21944.51817*qd^3-11930.76271*qb^3+2394.88100*qc^3-3970.93290*qa*qc^2+2322.11803*qa*qd^2-23212.08740*qa*qb^2
eq3=-3375.795773*qd+2240.03510*qb+7057.67167*qd*qc*qb+56197.14569*qc+52577.03189*qc^2*qd+2982.84431*qa*qd*qb-17977.24342*qd^2*qc-136.341409*qa*qc*qb-23855.89112*qb^2*qc-15689.91200*qa*qd*qc+15299.86799*qb^2*qd-25331.91138*qd^2*qb+11501.30926*qc^2*qb+19564.44679*qa-963.74805*qd^3+658.069730*qb^3-24654.25363*qc^3-16345.90692*qa*qc^2-13126.18932*qa*qd^2-4563.44385*qa*qb^2+2*b*qc
eq4=37246.67872*qd-29579.52855*qb-46347.15644*qd*qc*qb-3375.795773*qc-11079.46666*qc^2*qd+12449.76046*qa*qd*qb-24742.88407*qd^2*qc+2982.844222*qa*qc*qb+15299.86800*qb^2*qc-15680.68187*qa*qd*qc-28830.47715*qb^2*qd+20203.79697*qd^2*qb+26343.71462*qc^2*qb-14402.89763*qa-14953.58829*qd^3+31606.58056*qb^3+24809.55728*qc^3-5601.66129*qa*qc^2+16099.39874*qa*qd^2+3415.45305*qa*qb^2+2*b*qd
eq5=qa^2+qb^2+qc^2+qd^2-1
eq1=P(eq1)
eq2=P(eq2)
eq3=P(eq3)
eq4=P(eq4)
eq5=P(eq5)
I=Ideal(eq1, eq2, eq3, eq4, eq5)
I.groebner_basis('libsingular:std')
I.variety(RR)
Anyone knows how to make it work?
Thanksdavid_cFri, 29 Dec 2017 03:25:53 +0100https://ask.sagemath.org/question/40346/Multivariable equation in multiplicative group Z_phttps://ask.sagemath.org/question/39004/multivariable-equation-in-multiplicative-group-z_p/ I am able to, in wolfram alpha, plug in the equation
> 11=x*(y^119)^149mod151
where all numbers are in Z_151
and wolfram is able to give me a set of non-zero solutions (x,y) that I think satisfy (11*y^119, y)
I have tried using symbolic equations and the sage quickstart for number theory to replicate this functionality, but I am getting stuck on some integer conversion TypeErrors in sage.
I have tried to set it up like:
> x,y = var('x,y');
> qe=(mod(x*(y^119)^149,151)==mod(11,151))
Can someone help me set up this equation, and then solve for all possible non-zero solutions?
THanks!dcoleFri, 29 Sep 2017 15:19:36 +0200https://ask.sagemath.org/question/39004/Solving Logic Problemshttps://ask.sagemath.org/question/33935/solving-logic-problems/ A few years ago I asked [this](http://ask.sagemath.org/question/10068/solving-logic-problems/) question. I have another question along the same lines. Sorry about the <-> notation, I don't know how else to indicate bijection:
children = { Abe, Dan, Mary, Sue }
ages = { 3, 5, 6, 9 }
children <-> ages #bijection - one child per one age
Abe > Dan #Abe is older than Dan
Sue < Mary #Sue is younger than Mary
Sue = Dan + 3 #Sue's age is Dan's age plus 3 years
Mary > Abe #Mary is older than Abe
Can sagemath determine that:
Abe = 5
Dan = 3
Mary = 9
Sue = 6coder0xffMon, 27 Jun 2016 18:06:30 +0200https://ask.sagemath.org/question/33935/using 'solve' with trigonometric functionshttps://ask.sagemath.org/question/31191/using-solve-with-trigonometric-functions/
solve(tan(3*x)==1, x, to_poly_solve='force', explicit_solutions=True)
fails to produce answers while
solve(sin(3*x)==1, x, to_poly_solve='force', explicit_solutions=True)
works as expecteddrJMon, 30 Nov 2015 05:37:07 +0100https://ask.sagemath.org/question/31191/Finding solutions as numerical values rather than equationshttps://ask.sagemath.org/question/29393/finding-solutions-as-numerical-values-rather-than-equations/The output of solve() returns equations. What's the easiest way to "unwrap" these to get numerical values? For instance, solve(x^2-4==0,x) returns [x==-2, x==2]. I'd like to define the associated list [-2,2]. DaveGThu, 03 Sep 2015 16:29:52 +0200https://ask.sagemath.org/question/29393/Why does Sage not find any solutions using .solve()?https://ask.sagemath.org/question/24991/why-does-sage-not-find-any-solutions-using-solve/ Hello everyone,
please consider this attempt to solve simultaneous equations:
P,M,R,rho,kappa,T,F,n = var('P, M, R, rho, kappa, T, F, n')
eqns = [
P==M^2*R^-4,
R^3==M*rho^-1,
T^4==M*kappa*F*R^-4,
F==M*rho*T^n,
P==rho*T,
kappa==rho*T^(-7/2),
n==4
]
eqns
assume(P>0,M>0,R>0,rho>0,T>0,F>0,kappa>0)
sols = solve(eqns,(F,R,T))
sols
(returns [])
I would like to understand why Sage can not arrive at a relation for F,M,T (and n) which I was able to do by hand. Is solve inappropriate for isolating one or more variables from a set of equations?
Thank you for your help!
zuiopTue, 25 Nov 2014 12:56:59 +0100https://ask.sagemath.org/question/24991/solving implicit equationhttps://ask.sagemath.org/question/23494/solving-implicit-equation/ Hi experts!
I want to resolve the equation: $A.sin(x)=B.(C-x)$
where A, C and B are constants, $0\leq x\leq \pi $, $A$ and $B$ are fixed, and $0\leq C\leq \pi $.
I want to obtain the analytic solution, $x=f(C)$, (if exist) for different values of $C$ and if only implicit solution exist, obtain the curve and and table with the values of:
$ x$ vs. $C$
How can I do that?
Waiting for your answer.
Thanks a lot!
mresimulatorSat, 19 Jul 2014 15:53:05 +0200https://ask.sagemath.org/question/23494/Solving logic problemshttps://ask.sagemath.org/question/10068/solving-logic-problems/Given a set of rules, for example: 1. Mary is older than Tom, 2. Tom is older than Sue; Can sage solve the question, "is Mary older than Sue?"
More specifically, is Sage able to do what Prolog does - unification of logic problems? Thankscoder0xffSat, 27 Apr 2013 15:48:08 +0200https://ask.sagemath.org/question/10068/Solving simultaneous boolean algebraic equationshttps://ask.sagemath.org/question/9875/solving-simultaneous-boolean-algebraic-equations/Hi,
I have been searching around for a method of solving and simplifying simultaneous boolean algebraic equations. So far I have found programs that allow the simplification of boolean algebraic expressions but non that can perform the task of solving simultaneous equations. Any help would be greatly appreciated.
Thank youJoshTue, 05 Mar 2013 01:38:12 +0100https://ask.sagemath.org/question/9875/Polynomial identityhttps://ask.sagemath.org/question/9006/polynomial-identity/I'm pretty interested in solving the following kind of problem using Sage: ``Let R be a polynomial ring in, say, x,y,z as variables over a field k. I'd like to find field-elements a,b,c such that
a(x^2+y^2)+b(xy+zx)+c(xyz)==0, if they exist (I know they do)''
so that Sage returns (a,b,c)=(0,0,0). That seems to be an easy matter if one can traduce the polynomial identity into a vector space identity. I proved to be unable to do so.
I've to say that my polynomial identities are quite more cumbersome and include up to 7 variables so working them by-hand is almost impossible in a finite ammount of time or patience.AngelSun, 27 May 2012 11:53:59 +0200https://ask.sagemath.org/question/9006/