Skip to content

Maxima fails to recognize some expressions as equal #15395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sagetrac-aginiewicz mannequin opened this issue Nov 10, 2013 · 6 comments
Open

Maxima fails to recognize some expressions as equal #15395

sagetrac-aginiewicz mannequin opened this issue Nov 10, 2013 · 6 comments

Comments

@sagetrac-aginiewicz
Copy link
Mannequin

sagetrac-aginiewicz mannequin commented Nov 10, 2013

Maxima fails to regard some expressions as equal:

sage: value_1 = 1-golden_ratio
sage: value_2 = -golden_ratio^(-1)
sage: bool(value_1 == value_2)
True
sage: bool(value_1^x != value_2^x)
True

while

sage: bool(((x+1)^2)^y == (x^2+2*x+1)^y)
True
sage: sin(0,hold=True)^x == 0^x
sin(0)^x == 0^x
sage: bool(sin(0,hold=True)^x == 0^x)
True

Previous description:

I tried to define Fibonacci sequence using golden ratio in two ways, using values:

sage: value_1 = 1-golden_ratio
sage: value_2 = -golden_ratio^(-1)
sage: bool(value_1 == value_2)
true

(gives true, so two definitions, F1 and F2 below should be equal, even though they are not according to Sage)

sage: F1(k) = (golden_ratio^k-(value_1)^(k))/sqrt(5)
sage: F2(k) = (golden_ratio^k-(value_2)^(k))/sqrt(5)
sage: bool(F1(k) != F2(k))
true

When simplified everything seems to be equal at least for first 10 or 1000 elements:

sage: [(F1(j)-F2(j)).full_simplify() for j in range(10)]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Anyway, now to the error: limit for F1 gives wrong result:

sage: limit(F1(k+1)/F1(k), k=oo)
0

and for F2 works OK:

sage: limit(F2(k+1)/F2(k), k=oo)
1/2*sqrt(5) + 1/2

I've tested it with Sage 5.12 and 5.11, with same result. This can be as simple as some thing with how golden ratio is handled, or something far more involved maybe?

CC: @kcrisman @sagetrac-jakobkroeker

Component: calculus

Keywords: limit, golden_ratio

Stopgaps: wrongAnswerMarker

Issue created by migration from https://trac.sagemath.org/ticket/15395

@sagetrac-aginiewicz sagetrac-aginiewicz mannequin added this to the sage-6.1 milestone Nov 10, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@sagetrac-aginiewicz
Copy link
Mannequin Author

sagetrac-aginiewicz mannequin commented Apr 10, 2015

comment:5

I don't know when it happened, but in 6.4.1 the limit works:

sage: limit(F1(k+1)/F1(k), k=oo)
1/2*sqrt(5) + 1/2

but the comparison

sage: F1(k) = (golden_ratio^k-(value_1)^(k))/sqrt(5)
sage: F2(k) = (golden_ratio^k-(value_2)^(k))/sqrt(5)
sage: bool(F1(k) != F2(k))
true

is still wrong. Slightly minified example:

sage: value_1 = 1-golden_ratio
sage: value_2 = -golden_ratio^(-1)
sage: bool(value_1 == value_2)
True
sage: bool(value_1^x != value_2^x)
True

@rwst

This comment has been minimized.

@rwst rwst changed the title Wrong limit for squence involving Fibonacci sequence, 0 instead of golden ratio Maxima fails to recognize some expressions as equal Apr 11, 2015
@sagetrac-jakobkroeker
Copy link
Mannequin

sagetrac-jakobkroeker mannequin commented Feb 26, 2017

Stopgaps: wrongAnswerMarker

@mkoeppe
Copy link
Contributor

mkoeppe commented Aug 29, 2020

comment:8

Unchanged after #30063 Maxima 5.44.0

@mkoeppe mkoeppe modified the milestones: sage-6.4, sage-9.2 Aug 29, 2020
@kcrisman
Copy link
Member

comment:9

Thanks very much for checking up on all these old tickets.

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 7, 2021

comment:11

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Apr 7, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 22, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe mkoeppe removed this from the sage-9.7 milestone Sep 19, 2022
@mkoeppe mkoeppe added this to the sage-9.8 milestone Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants