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.Wed, 18 Nov 2020 10:14:17 +0100Confusion with equations with no explicit solutionhttps://ask.sagemath.org/question/54268/confusion-with-equations-with-no-explicit-solution/Hello,
I started getting into sage a couple of days ago. To do so I’m following the handbook « Computational Mathematics with SageMath » and I came across something that I would like to have more details about but I didn’t find anything in the documentation.
So the handbook states that
> “In most cases, as soon as the
> equation or system becomes too
> complex, no explicit solution can be
> found:
sage: solve(x^(1/x)==(1/x)^x, x)
> [(1/x)^x == x^(1/x)]
> However, this is not necessarily a limitation!
> Indeed, a specificity of computer
> algebra is the ability to manipulate
> objects defined by equations, and in
> particular to compute their
> properties, without solving them
> explicitly. Even better: in some
> cases, the equation defining a
> mathematical object is the best
> algorithmic representation for it.”
But it doesn’t say what they mean by an equation being “too complex”. And what does it mean for an equation to not have an explicit solution. Plus in some cases we want to have a numerical result (even if it’s an approximation). For exemple I tried finding from what n0 the Tyler series of the exponential function at x0=1 is in the interval [e-10^-3, e+10^-3] i.e.
∀ ε > 10⁻³ , n > n0 ⇒ | vn − e | < ε
vn being equal to the sum of the terms 1 / i! for i ∈ [ 0, n ]. That being the definition of the Taylor series of the exponential function at x0=1 without taking account of the rest.
to do so I wrote this :
sage: k, n, n0, epsilon = var('k, n, n0, epsilon')
sage: assume(n, 'integer')
sage: epsilon = 1e-1
sage: u(n) = 1/factorial(n)
sage: v(n) = sum(u(k), k, 0, n)
sage: n0 = solve(e - v(n) > epsilon, n)
sage: n0
And sage gives out :
> [[e - sum(1/factorial(k), k, 0, n) - 0.1 > 0]]
The documentation says that to get an explicit solution we jut got to set the parameter explicit_solutions to True but I tried it and it doesn't work. Also I'm using the 8.1 version (it's the latest I found on the ubunru packages repository and I tried to download the 9.2 version but the archive was too voluminous (it's 14 GB and I didn't have enough memoiry space to extract it)
Is it possible to get an approximation of the solution in this case I don’t care for the result to be an approximation because I just need the integer part of it anyway.
Please help me I don’t really know if the problem is that the equation is “too complex” or maybe I’m just not using the sum function right.
Thank you in advance.aylimenzWed, 18 Nov 2020 10:14:17 +0100https://ask.sagemath.org/question/54268/Can you specify an explicit curve by specifying its x,y points ?https://ask.sagemath.org/question/51146/can-you-specify-an-explicit-curve-by-specifying-its-xy-points/I was wondering if I can specify a curve by giving its x,y points:
(0,0),(0.5, 0.25),(0.6, 0.36),(2.0, 4.0)
and then do various other manipulation of this curve like, interpolation, derivative at some point, aread under the curve between two points (integral) etc?MoWed, 29 Apr 2020 16:38:12 +0200https://ask.sagemath.org/question/51146/obtain explicit solutions from "solve"https://ask.sagemath.org/question/10761/obtain-explicit-solutions-from-solve/I tried to use "solve" but, in the output, the variable of my interest is left implicit
[x3 == 1/6780*(27360*a + 9618*t - sqrt(202500*t^2*x3^2 + 1464480000*a^2 + 541225440*a*t + 17122609*t^2 + 22500*(528*a*t + 7*t^2)*x3 - 26040*sqrt(324*t^2*x3^2 + 20736*a^2 + 2016*a*t + 49*t^2 + 36*(528*a*t + 7*t^2)*x3)*(240*a + 13*t)) - 25*sqrt(324*t^2*x3^2 + 20736*a^2 + 2016*a*t + 49*t^2 + 36*(528*a*t + 7*t^2)*x3))/t, x3 == 1/6780*(27360*a + 9618*t + sqrt(202500*t^2*x3^2 + 1464480000*a^2 + 541225440*a*t + 17122609*t^2 + 22500*(528*a*t + 7*t^2)*x3 - 26040*sqrt(324*t^2*x3^2 + 20736*a^2 + 2016*a*t + 49*t^2 + 36*(528*a*t + 7*t^2)*x3)*(240*a + 13*t)) - 25*sqrt(324*t^2*x3^2 + 20736*a^2 + 2016*a*t + 49*t^2 + 36*(528*a*t + 7*t^2)*x3))/t]
Someone can help me? Thank you,
Carlo
carlo.bottaiThu, 21 Nov 2013 17:01:04 +0100https://ask.sagemath.org/question/10761/Does Cython support type names from inttypes.h?https://ask.sagemath.org/question/7617/does-cython-support-type-names-from-inttypesh/I tried using int32\_t or int64\_t instead of long or long long, and it wouldn't compile.
What's the syntax sugar? Or are the explicit type names not allowed?ccanoncMon, 23 Aug 2010 14:42:03 +0200https://ask.sagemath.org/question/7617/