How to use make_entry method in autotest

Best Python code snippet using autotest_python

legendre_elliptic.py

Source:legendre_elliptic.py Github

copy

Full Screen

...170# Section("Derivatives and differential equations"),171# Entries(172# ),173)174make_entry(ID("e8ae42"),175 SymbolDefinition(EllipticK, EllipticK(m), "Legendre complete elliptic integral of the first kind"))176make_entry(ID("723fd0"),177 SymbolDefinition(EllipticE, EllipticE(m), "Legendre complete elliptic integral of the second kind"))178make_entry(ID("34482b"),179 SymbolDefinition(EllipticPi, EllipticPi(n, m), "Legendre complete elliptic integral of the third kind"))180make_entry(ID("107140"),181 SymbolDefinition(IncompleteEllipticF, IncompleteEllipticF(phi, m), "Legendre incomplete elliptic integral of the first kind"))182make_entry(ID("afdf5d"),183 SymbolDefinition(IncompleteEllipticE, IncompleteEllipticE(phi, m), "Legendre incomplete elliptic integral of the second kind"))184make_entry(ID("53b1e7"),185 SymbolDefinition(IncompleteEllipticPi, IncompleteEllipticPi(n, phi, m), "Legendre incomplete elliptic integral of the third kind"))186# Illustrations187make_entry(ID("89d93c"),188 Image(Description("Plot of", EllipticK(m), "on", Element(m, ClosedInterval(-2,2))),189 ImageSource("plot_elliptic_k")))190make_entry(ID("210213"),191 Image(Description("Plot of", EllipticE(m), "on", Element(m, ClosedInterval(-2,2))),192 ImageSource("plot_elliptic_e")))193make_entry(ID("4704f9"),194 Image(Description("Plot of", IncompleteEllipticF(phi, m), "on", Element(phi, ClosedInterval(-(2*Pi),2*Pi))),195 ImageSource("plot_incomplete_elliptic_f")))196make_entry(ID("20d72c"),197 Image(Description("Plot of", IncompleteEllipticE(phi, m), "on", Element(phi, ClosedInterval(-(2*Pi),2*Pi))),198 ImageSource("plot_incomplete_elliptic_e")))199# Integral representations200make_entry(ID("0455b3"),201 Formula(Equal(EllipticK(m), Integral(1/Sqrt(1-m*Sin(x)**2), For(x, 0, Pi / 2)))),202 Variables(m),203 Assumptions(Element(m, SetMinus(CC, ClosedOpenInterval(1, Infinity)))))204make_entry(ID("190843"),205 Formula(Equal(EllipticE(m), Integral(Sqrt(1-m*Sin(x)**2), For(x, 0, Pi / 2)))),206 Variables(m),207 Assumptions(Element(m, CC)))208make_entry(ID("83a535"),209 Formula(Equal(EllipticPi(n, m), Integral(1/((1-n*Sin(x)**2) * Sqrt(1 - m*Sin(x)**2)), For(x, 0, Pi / 2)))),210 Variables(n, m),211 Assumptions(And(Element(n, OpenInterval(-Infinity, 1)), Element(m, OpenInterval(-Infinity, 1)))))212make_entry(ID("47dead"),213 Formula(Equal(EllipticK(m), Integral(1/(Sqrt(1-x**2) * Sqrt(1 - m*x**2)), For(x, 0, 1)))),214 Variables(m),215 Assumptions(Element(m, SetMinus(CC, ClosedOpenInterval(1, Infinity)))))216 217make_entry(ID("fa8666"),218 Formula(Equal(EllipticE(m), Integral(Sqrt(1-m*x**2) / Sqrt(1-x**2), For(x, 0, 1)))),219 Variables(m),220 Assumptions(Element(m, CC)))221make_entry(ID("c10014"),222 Formula(Equal(EllipticPi(n, m), Integral(1/((1-n*x**2)*Sqrt(1-x**2)*Sqrt(1-m*x**2)), For(x, 0, 1)))),223 Variables(n, m),224 Assumptions(And(Element(n, OpenInterval(-Infinity, 1)), Element(m, OpenInterval(-Infinity, 1)))))225make_entry(ID("7cd257"),226 Formula(Equal(EllipticK(m), Integral(1/(Sqrt(x**2-1) * Sqrt(x**2-m)), For(x, 1, Infinity)))),227 Variables(m),228 Assumptions(Element(m, SetMinus(CC, ClosedOpenInterval(1, Infinity)))))229make_entry(ID("81fb10"),230 Formula(Equal(IncompleteEllipticF(phi, m), Integral(1/Sqrt(1-m*Sin(x)**2), For(x, 0, phi)))),231 Variables(phi, m),232 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(m, SetMinus(CC, ClosedOpenInterval(1, Infinity))))))233make_entry(ID("2ff7e7"),234 Formula(Equal(IncompleteEllipticE(phi, m), Integral(Sqrt(1-m*Sin(x)**2), For(x, 0, phi)))),235 Variables(phi, m),236 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(m, CC))))237make_entry(ID("60f858"),238 Formula(Equal(IncompleteEllipticPi(n, phi, m), Integral(1/((1-n*Sin(x)**2) * Sqrt(1 - m*Sin(x)**2)), For(x, 0, phi)))),239 Variables(n, phi, m),240 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(n, OpenInterval(-Infinity, 1)), Element(m, OpenInterval(-Infinity, 1)))))241make_entry(ID("33ee4a"),242 Formula(Equal(IncompleteEllipticF(phi, m), Integral(1/(Sqrt(1-x**2) * Sqrt(1 - m*x**2)), For(x, 0, Sin(phi))))),243 Variables(phi, m),244 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(m, SetMinus(CC, ClosedOpenInterval(1, Infinity))))))245make_entry(ID("5e869b"),246 Formula(Equal(IncompleteEllipticE(phi, m), Integral(Sqrt(1-m*x**2)/Sqrt(1-x**2), For(x, 0, Sin(phi))))),247 Variables(phi, m),248 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(m, CC))))249make_entry(ID("06223c"),250 Formula(Equal(IncompleteEllipticPi(n, phi, m), Integral(1/((1-n*x**2) * Sqrt(1-x**2) * Sqrt(1 - m*x**2)), For(x, 0, Sin(phi))))),251 Variables(n, phi, m),252 Assumptions(And(Element(phi, ClosedInterval(-Pi/2, Pi/2)), Element(n, OpenInterval(-Infinity, 1)), Element(m, OpenInterval(-Infinity, 1)))))253# Specific values254# todo: singular values http://functions.wolfram.com/EllipticIntegrals/EllipticK/03/ShowAll.html -- also for modular lambda function255## Complete integrals256make_entry(ID("bb4501"),257 Formula(Equal(EllipticK(0), Pi / 2)))258make_entry(ID("1d62a7"),259 Formula(Equal(EllipticE(0), Pi / 2)))260make_entry(ID("45b157"),261 Formula(Equal(EllipticK(1), Infinity)))262make_entry(ID("958a3f"),263 Formula(Equal(EllipticE(1), 1)))264make_entry(ID("afb22a"),265 Formula(Equal(EllipticK(-1), Div(Pow(Gamma(Div(1, 4)), 2), Mul(4, Sqrt(Mul(2, Pi)))))))266make_entry(ID("cc22bf"),267 Formula(Equal(EllipticK(Div(1,2)), Div(Pow(Gamma(Div(1, 4)), 2), Mul(4, Sqrt(Pi))))))268make_entry(ID("630eca"),269 Formula(Equal(EllipticK(2), Mul(Div(Pow(Gamma(Div(1, 4)), 2), Mul(4, Sqrt(Mul(2, Pi)))), Sub(1, ConstI)))))270make_entry(ID("9f3474"),271 Formula(Equal(EllipticE(-1), Mul(Sqrt(2), Add(Div(Pow(Gamma(Div(1, 4)), 2), Mul(8, Sqrt(Pi))), Div(Pow(Pi, Div(3, 2)), Pow(Gamma(Div(1, 4)), 2)))))))272make_entry(ID("3b272e"),273 Formula(Equal(EllipticE(Div(1, 2)), Add(Div(Pow(Gamma(Div(1, 4)), 2), Mul(8, Sqrt(Pi))), Div(Pow(Pi, Div(3, 2)), Pow(Gamma(Div(1, 4)), 2))))))274make_entry(ID("5d2c01"),275 Formula(Equal(EllipticE(2), Mul(Div(Mul(Sqrt(2), Pow(Pi, Div(3, 2))), Pow(Gamma(Div(1, 4)), 2)), Add(1, ConstI)))))276make_entry(ID("2991b5"),277 Formula(Equal(EllipticK((3-2*Sqrt(2))**2), Div(Mul(Add(2, Sqrt(2)), Pow(Gamma(Div(1, 4)), 2)), Mul(16, Sqrt(Pi))))))278make_entry(ID("4b040d"),279 Formula(Equal(EllipticK((4-3*Sqrt(2))/8), Div(Pow(Gamma(Div(1, 4)), 2), Mul(Mul(4, Pow(2, Div(1, 4))), Sqrt(Pi))))))280make_entry(ID("0abbe1"),281 Formula(Equal(EllipticK((1+Sqrt(3)*ConstI)/2), Exp(ConstI * Pi / 12) * 3**Div(1,4) * Gamma(Div(1,3))**3 / (2**Div(7,3) * Pi))))282make_entry(ID("175b7a"),283 Formula(Equal(EllipticK((1-Sqrt(3)*ConstI)/2), Exp(-(ConstI * Pi / 12)) * 3**Div(1,4) * Gamma(Div(1,3))**3 / (2**Div(7,3) * Pi))))284make_entry(ID("b95ffa"),285 Formula(Equal(EllipticK(4*Sqrt(3)-7), (Sqrt(3 + 2*Sqrt(3)) * Gamma(Div(1,3))**3 / (2**Div(10,3) * Pi)))))286make_entry(ID("40a376"),287 Formula(Equal(EllipticK(Div(1,2) - Sqrt(3)/4), (3**Div(1,4) * Gamma(Div(1,3))**3) / (4 * 2**Div(1,3) * Pi))))288make_entry(ID("618a54"),289 Formula(Equal(EllipticPi(0, 0), Pi / 2)))290make_entry(ID("18e226"),291 Formula(Equal(EllipticPi(0, 1), Infinity)))292make_entry(ID("061c49"),293 Formula(Equal(EllipticPi(1, 0), UnsignedInfinity)))294make_entry(ID("3c4979"),295 Formula(Equal(EllipticPi(0, Div(1, 2)), Div(Pow(Gamma(Div(1, 4)), 2), Mul(4, Sqrt(Pi))))))296make_entry(ID("124d02"),297 Formula(Equal(EllipticPi(Div(1, 2), 0), (Pi * Sqrt(2)) / 2)))298make_entry(ID("9b0385"),299 Formula(Equal(EllipticPi(Div(1, 2), Div(1, 2)), Add(Div(Pow(Gamma(Div(1, 4)), 2), Mul(4, Sqrt(Pi))), Div(2 * Pow(Pi, Div(3, 2)), Pow(Gamma(Div(1, 4)), 2))))))300make_entry(ID("ce4df4"),301 Formula(Equal(EllipticPi(1, m), UnsignedInfinity)),302 Variables(m),303 Assumptions(Element(m, CC)))304make_entry(ID("e9c797"),305 Formula(Equal(EllipticPi(n, 1), Cases(Tuple((1-n)**(-1) * Infinity, NotEqual(n, 1)), Tuple(UnsignedInfinity, Equal(n, 1))))),306 Variables(n),307 Assumptions(Element(n, CC)))308make_entry(ID("5d8804"),309 Formula(Equal(EllipticPi(n, 0), Pi / (2 * Sqrt(1 - n)))),310 Variables(n),311 Assumptions(Element(n, CC)))312make_entry(ID("dd67fb"),313 Formula(Equal(EllipticPi(0, m), EllipticK(m))),314 Variables(m),315 Assumptions(Element(m, CC)))316make_entry(ID("9227bf"),317 Formula(Equal(EllipticPi(m, m), EllipticE(m) / (1 - m))),318 Variables(m),319 Assumptions(Element(m, CC)))320## Incomplete integrals321make_entry(ID("ba1965") ,322 Formula(Equal(IncompleteEllipticF(0, 0), 0)))323make_entry(ID("4268fc"),324 Formula(Equal(IncompleteEllipticF(0, m), 0)),325 Variables(m),326 Assumptions(Element(m, CC)))327make_entry(ID("d2adb6"),328 Formula(Equal(IncompleteEllipticF(phi, 0), phi)),329 Variables(phi),330 Assumptions(Element(phi, CC)))331make_entry(ID("0b8fd6"),332 Formula(Equal(IncompleteEllipticF(Pi / 2, m), EllipticK(m))),333 Variables(m),334 Assumptions(Element(m, CC)))335make_entry(ID("81f7db"),336 Formula(Equal(IncompleteEllipticF(-Pi / 2, m), -EllipticK(m))),337 Variables(m),338 Assumptions(Element(m, CC)))339make_entry(ID("afabeb"),340 Formula(Equal(IncompleteEllipticF(Pi * k / 2, m), k * EllipticK(m))),341 Variables(m, k),342 Assumptions(And(Element(m, CC), Element(k, ZZ), Or(NotEqual(k, 0), NotEqual(m, 1)))))343make_entry(ID("c0ad12"),344 Formula(Equal(IncompleteEllipticF(Pi / 2, 0), Pi / 2)))345make_entry(ID("ace837"),346 Formula(Equal(IncompleteEllipticF(Pi / 2, -1), Gamma(Div(1,4))**2 / (4*Sqrt(2*Pi)))))347make_entry(ID("16612f"),348 Formula(Equal(IncompleteEllipticF(Pi / 2, 1), Infinity)))349make_entry(ID("04c829"),350 Formula(Equal(IncompleteEllipticF(-Pi / 2, 1), -Infinity)))351make_entry(ID("c584c3"),352 Formula(Equal(IncompleteEllipticF(Pi / 3, 1), Log(2+Sqrt(3)))))353make_entry(ID("f5d489"),354 Formula(Equal(IncompleteEllipticF(Pi / 4, 1), Log(1+Sqrt(2)))))355make_entry(ID("a91f8d"),356 Formula(Equal(IncompleteEllipticF(Pi / 6, 1), Log(3)/2)))357make_entry(ID("8b4be6"),358 Formula(Equal(IncompleteEllipticF(Pi / 4, 2), Div(Mul(Sqrt(2), Pow(Gamma(Div(1, 4)), 2)), Mul(8, Sqrt(Pi))))))359make_entry(ID("aac129"),360 Formula(Equal(IncompleteEllipticF(Pi / 6, 4), (EllipticK(Div(1,4)) / 2))))361make_entry(ID("b7cfb3"),362 Formula(Equal(IncompleteEllipticF(phi, 1), Cases(Tuple(Log((1 + Sin(phi))/Cos(phi)), And(LessEqual(-Pi/2, Re(phi), Pi/2), NotElement(phi, Set(-Pi/2, Pi/2)))),363 Tuple(Sign(phi) * Infinity, Element(phi, Set(-Pi/2, Pi/2))),364 Tuple(UnsignedInfinity, Otherwise)))),365 Variables(phi),366 Assumptions(Element(phi, CC)))367make_entry(ID("087a7c"),368 Formula(Equal(IncompleteEllipticF(Asin(1/Sqrt(m)), m), EllipticK(1/m) / Sqrt(m))),369 Variables(m),370 Assumptions(Element(m, SetMinus(CC, Set(0)))))371make_entry(ID("a6c07e"),372 Formula(Equal(IncompleteEllipticE(0, 0), 0)))373make_entry(ID("be3e09"),374 Formula(Equal(IncompleteEllipticE(0, m), 0)))375make_entry(ID("efc7a4"),376 Formula(Equal(IncompleteEllipticE(phi, 0), phi)),377 Variables(phi),378 Assumptions(Element(phi, CC)))379make_entry(ID("1b881e"),380 Formula(Equal(IncompleteEllipticE(Pi/2, m), EllipticE(m))),381 Variables(m),382 Assumptions(Element(m, CC)))383make_entry(ID("2ef763"),384 Formula(Equal(IncompleteEllipticE(-Pi/2, m), -EllipticE(m))),385 Variables(m),386 Assumptions(Element(m, CC)))387make_entry(ID("a14442"),388 Formula(Equal(IncompleteEllipticE(Pi*k/2, m), k*EllipticE(m))),389 Variables(m, k),390 Assumptions(And(Element(m, CC), Element(k, ZZ))))391make_entry(ID("75e141"),392 Formula(Equal(IncompleteEllipticE(phi, 1), Sin(phi))),393 Variables(phi),394 Assumptions(And(Element(phi, CC), Or(Element(Re(phi), ClosedOpenInterval(-Pi/2, Pi/2)), Equal(phi, Pi/2)))))395make_entry(ID("f35a37"),396 Formula(Equal(IncompleteEllipticE(phi, 1), (-1)**Floor(Re(phi)/Pi+Div(1,2)) * Sin(phi) + 2*Floor(Re(phi)/Pi+Div(1,2)))),397 Variables(phi),398 Assumptions(Element(phi, CC)))399make_entry(ID("51a946"),400 Formula(Equal(IncompleteEllipticE(Pi / 2, 0), Pi / 2)))401make_entry(ID("2573ba"),402 Formula(Equal(IncompleteEllipticE(Pi / 2, -1), Mul(Sqrt(2), Add(Div(Pow(Gamma(Div(1, 4)), 2), Mul(8, Sqrt(Pi))), Div(Pow(Pi, Div(3, 2)), Pow(Gamma(Div(1, 4)), 2)))))))403make_entry(ID("b62aae"),404 Formula(Equal(IncompleteEllipticE(Pi / 2, 1), 1)))405make_entry(ID("dec0d2"),406 Formula(Equal(IncompleteEllipticE(-Pi / 2, 1), -1)))407make_entry(ID("2245df"),408 Formula(Equal(IncompleteEllipticE(Pi*k/2, 1), k)),409 Variables(k),410 Assumptions(Element(k, ZZ)))411make_entry(ID("3aed02"),412 Formula(Equal(IncompleteEllipticE(Pi/3, 1), Sqrt(3) / 2)))413make_entry(ID("d88dd1"),414 Formula(Equal(IncompleteEllipticE(Pi/6, 1), Div(1, 2))))415make_entry(ID("4dabda"),416 Formula(Equal(IncompleteEllipticE(Pi/4, 2), Div(Mul(Sqrt(2), Pow(Pi, Div(3, 2))), Pow(Gamma(Div(1, 4)), 2)))))417make_entry(ID("eba27c"),418 Formula(Equal(IncompleteEllipticE(Pi/6, 4), 2*EllipticE(Div(1, 4)) - Div(3,2)*EllipticK(Div(1, 4)))))419make_entry(ID("f0bcb5"),420 Formula(Equal(IncompleteEllipticE(Asin(1/Sqrt(m)), m), Sqrt(m) * (EllipticE(1/m) - (1 - 1/m)*EllipticK(1/m)))),421 Variables(m),422 Assumptions(Element(m, SetMinus(CC, Set(0, 1)))))423# Functional equations424make_entry(ID("713966"),425 Formula(Equal(EllipticK(Conjugate(m)), Conjugate(EllipticK(m)))),426 Variables(m),427 Assumptions(Element(m, SetMinus(CC, OpenInterval(1, Infinity)))))428make_entry(ID("8e5c81"),429 Formula(Equal(EllipticE(Conjugate(m)), Conjugate(EllipticE(m)))),430 Variables(m),431 Assumptions(Element(m, SetMinus(CC, OpenInterval(1, Infinity)))))432make_entry(ID("b0eb37"),433 Formula(Equal(IncompleteEllipticF(-phi, m), -IncompleteEllipticF(phi, m))),434 Variables(phi, m),435 Assumptions(And(Element(phi, CC), Element(m, CC))))436make_entry(ID("aa1b8e"),437 Formula(Equal(IncompleteEllipticE(-phi, m), -IncompleteEllipticE(phi, m))),438 Variables(phi, m),439 Assumptions(And(Element(phi, CC), Element(m, CC))))440make_entry(ID("255d81"),441 Formula(Equal(IncompleteEllipticPi(n, -phi, m), -IncompleteEllipticPi(n, phi, m))),442 Variables(n, phi, m),443 Assumptions(And(Element(n, CC), Element(phi, CC), Element(m, CC))))444make_entry(ID("685126"),445 Formula(Equal(IncompleteEllipticF(phi + k*Pi, m), IncompleteEllipticF(phi, m) + 2 * k * EllipticK(m))),446 Variables(phi, m, k),447 Assumptions(And(Element(phi, CC), Element(m, CC), Element(k, ZZ), NotEqual(m, 1))))448make_entry(ID("c28288"),449 Formula(Equal(IncompleteEllipticE(phi + k*Pi, m), IncompleteEllipticE(phi, m) + 2 * k * EllipticE(m))),450 Variables(phi, m, k),451 Assumptions(And(Element(phi, CC), Element(m, CC), Element(k, ZZ))))452make_entry(ID("5f84d9"),453 Formula(Equal(IncompleteEllipticPi(n, phi + k*Pi, m), IncompleteEllipticPi(n, phi, m) + 2 * k * EllipticPi(n, m))),454 Variables(n, phi, m, k),455 Assumptions(And(Element(n, CC), Element(phi, CC), Element(m, CC), Element(k, ZZ), NotEqual(n, 1), NotEqual(m, 1))))456# Representation by other functions457## Hypergeometric functions458make_entry(ID("b760d1"),459 Formula(Equal(EllipticK(m), (Pi/2) * Hypergeometric2F1(Div(1,2), Div(1,2), 1, m))),460 Variables(m),461 Assumptions(Element(m, CC)))462make_entry(ID("16d2e1"),463 Formula(Equal(EllipticE(m), (Pi/2) * Hypergeometric2F1(-Div(1,2), Div(1,2), 1, m))),464 Variables(m),465 Assumptions(Element(m, CC)))466make_entry(ID("752619"),467 Formula(Equal(2*EllipticE(m) - EllipticK(m), (Pi/2) * Hypergeometric2F1(-Div(1,2), Div(3,2), 1, m))),468 Variables(m),469 Assumptions(Element(m, CC)))470## AGM (see AGM ...)471## Carlson integrals472# todo: check singularities in the following473make_entry(ID("0cc11f"),474 Formula(Equal(EllipticK(m), CarlsonRF(0, 1-m, 1))),475 Variables(m),476 Assumptions(Element(m, CC)))477make_entry(ID("6520e7"),478 Formula(Equal(EllipticE(m), 2 * CarlsonRG(0, 1-m, 1))),479 Variables(m),480 Assumptions(Element(m, CC)))481make_entry(ID("9ccaef"),482 Formula(Equal(EllipticPi(n, m), CarlsonRF(0, 1-m, 1) + (n/3) * CarlsonRJ(0, 1-m, 1, 1-n))),483 Variables(n, m),484 Assumptions(And(Element(n, CC), Element(m, CC), NotEqual(m, 1))))485make_entry(ID("41cf8e"),486 Formula(Equal(EllipticE(m), ((1-m)/3) * (CarlsonRD(0, 1-m, 1) + CarlsonRD(0, 1, 1-m)))),487 Variables(m),488 Assumptions(And(Element(m, CC), NotEqual(m, 1))))489make_entry(ID("94f646"),490 Formula(Equal(EllipticK(m) - EllipticE(m), (m / 3) * CarlsonRD(0, 1-m, 1))),491 Variables(m),492 Assumptions(Element(m, CC)))493make_entry(ID("55d23d"),494 Formula(Equal(EllipticE(m) - (1-m) * EllipticK(m), ((m*(1-m)) / 3) * CarlsonRD(0, 1, 1-m))),495 Variables(m),496 Assumptions(Element(m, CC)))497make_entry(ID("e2445d"),498 Formula(Equal(IncompleteEllipticF(phi, m), Sin(phi) * CarlsonRF(Cos(phi)**2, 1 - m*Sin(phi)**2, 1))),499 Variables(phi, m),500 Assumptions(And(Element(phi, CC), Element(m, CC), LessEqual(-Pi/2, Re(phi), Pi/2))))501make_entry(ID("f48f54"),502 Formula(Equal(IncompleteEllipticE(phi, m), Sin(phi) * CarlsonRF(Cos(phi)**2, 1 - m*Sin(phi)**2, 1) - Div(1,3)*m*Sin(phi)**3*CarlsonRD(Cos(phi)**2, 1-m*Sin(phi)**2, 1))),503 Variables(phi, m),504 Assumptions(And(Element(phi, CC), Element(m, CC), LessEqual(-Pi/2, Re(phi), Pi/2))))505make_entry(ID("8f4e31"),506 Formula(Equal(IncompleteEllipticPi(n, phi, m), Sin(phi) * CarlsonRF(Cos(phi)**2, 1 - m*Sin(phi)**2, 1) + Div(1,3)*n*Sin(phi)**3*CarlsonRJ(Cos(phi)**2, 1-m*Sin(phi)**2, 1, 1-n*Sin(phi)**2))),507 Variables(n, phi, m),...

Full Screen

Full Screen

sine.py

Source:sine.py Github

copy

Full Screen

...150 "f3a901",151 "03f713",152 ),153)154make_entry(ID("b63dce"),155 SymbolDefinition(Sin, Sin(z), "Sine"),156 Description("The sine function", Sin(z),157 "(denoted by", SourceForm(Sin(z)), "in the Fungrim formula language)",158 "is a function of a single variable.",159 "It can be defined for real and complex arguments by the series",160 EntryReference("f340cb"), "or by the differential equation",161 EntryReference("21f156"), "with appropriate initial values.",162 "The following table lists conditions such that", SourceForm(Sin(z)), "is defined in Fungrim."),163 Table(TableRelation(Tuple(P, Q), Implies(P, Q)),164 TableHeadings(Description("Domain"), Description("Codomain")),165 List(166 TableSection("Numbers"),167 Tuple(Element(z, RR), Element(Sin(z), ClosedInterval(-1, 1))),168 Tuple(Element(z, CC), Element(Sin(z), CC)),169 TableSection("Formal power series"),170 Tuple(Element(z, PowerSeries(RR, x)), Element(Sin(z), PowerSeries(RR, x))),171 Tuple(Element(z, PowerSeries(CC, x)), Element(Sin(z), PowerSeries(CC, x))),172 )))173make_entry(ID("31fef8"),174 Image(Description("X-ray of", Sin(z), "on", Element(z, ClosedInterval(-5,5) + ClosedInterval(-5,5)*ConstI)),175 ImageSource("xray_sin")),176 description_xray,177 )178# Differential equations179C_1 = Subscript(c, 1)180C_2 = Subscript(c, 2)181make_entry(ID("21f156"),182 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, 2)) + Sin(z), 0)),183 Variables(z),184 Assumptions(Element(z, CC)))185make_entry(ID("984d9c"),186 Formula(Where(Equal(ComplexDerivative(y(z), For(z, z, 2)) + y(z), 0), Equal(y(z), C_1 * Sin(z) + C_2 * Cos(z)))),187 Variables(z, C_1, C_2),188 Assumptions(And(Element(z, CC), Element(C_1, CC), Element(C_2, CC))))189make_entry(ID("f1691f"),190 Formula(Where(Equal(ComplexDerivative(y(z), For(z, z, 2)) + a**2 * y(z) + b, 0), Equal(y(z), C_1 * Sin(a*z) + C_2 * Cos(a*z) - b/a**2))),191 Variables(z, a, b, C_1, C_2),192 Assumptions(And(Element(z, CC), Element(a, SetMinus(CC, Set(0))), Element(b, CC), Element(C_1, CC), Element(C_2, CC))))193# Specific values194make_entry(ID("c52772"),195 Formula(Equal(Sin(0), 0)))196make_entry(ID("e2161b"),197 Formula(Equal(Sin(Pi), 0)))198make_entry(ID("69c5ef"),199 Formula(Equal(Sin(Pi/2), 1)))200make_entry(ID("56667c"),201 Formula(Equal(Sin(3*Pi/2), -1)))202make_entry(ID("3c833f"),203 Formula(Equal(Sin(Pi/3), Sqrt(3)/2)))204make_entry(ID("5fc688"),205 Formula(Equal(Sin(Pi/4), Sqrt(2)/2)))206make_entry(ID("ad6b74"),207 Formula(Equal(Sin(Pi/6), Div(1,2))))208make_entry(ID("c62afa"),209 Formula(Equal(Sin(Pi*k), 0)),210 Variables(k),211 Assumptions(Element(k, ZZ)))212make_entry(ID("506d0c"),213 Formula(Equal(Sin(Pi/2 + Pi*k), (-1)**k)),214 Variables(k),215 Assumptions(Element(k, ZZ)))216make_entry(ID("09cd0b"),217 Formula(NotElement(Sin(alpha), AlgebraicNumbers)),218 References("Consequence of the Lindemann-Weierstrass theorem."),219 Variables(alpha),220 Assumptions(Element(alpha, SetMinus(AlgebraicNumbers, Set(0)))))221make_entry(ID("713501"),222 Formula(Element(Sin(Pi * x), AlgebraicNumbers)),223 Variables(x),224 Assumptions(Element(x, QQ)))225make_entry(ID("056c0e"),226 Formula(Implies(And(Element(x, QQ), Element(Sin(Pi*x), QQ)), Element(Sin(Pi*x), Set(0, Div(1,2), -Div(1,2), 1, -1)))),227 References("Niven's theorem"))228make_entry(ID("2f6818"),229 Formula(Equal(Zeros(Brackets(Sin(z)), ForElement(z, CC)), Set(Pi * n, ForElement(n, ZZ)))))230make_entry(ID("c5bdcc"),231 Formula(Equal(ArgMax(Brackets(Sin(x)), ForElement(x, RR)), Set(Pi * (2 * n + Div(1,2)), ForElement(n, ZZ)))))232make_entry(ID("ad04bd"),233 Formula(Equal(ArgMin(Brackets(Sin(x)), ForElement(x, RR)), Set(Pi * (2 * n - Div(1,2)), ForElement(n, ZZ)))))234make_entry(ID("bfe28b"),235 Formula(Equal(Maximum(Brackets(Sin(x)), ForElement(x, RR)), 1)))236make_entry(ID("27766c"),237 Formula(Equal(Minimum(Brackets(Sin(x)), ForElement(x, RR)), -1)))238# Analytic properties239make_entry(ID("114913"),240 Formula(IsHolomorphic(Sin(z), ForElement(z, CC))))241make_entry(ID("f4cc9e"),242 Formula(Equal(Poles(Sin(z), ForElement(z, Union(CC, Set(UnsignedInfinity)))), Set())))243make_entry(ID("6aa0bc"),244 Formula(Equal(EssentialSingularities(Sin(z), z, Union(CC, Set(UnsignedInfinity))), Set(UnsignedInfinity))))245make_entry(ID("96550d"),246 Formula(Equal(BranchPoints(Sin(z), z, Union(CC, Set(UnsignedInfinity))), Set())))247make_entry(ID("a45c61"),248 Formula(Equal(BranchCuts(Sin(z), z, CC), Set())))249# Symmetry and periodicity250make_entry(ID("a2a30d"),251 Formula(Equal(Sin(-z), -Sin(z))),252 Variables(z),253 Assumptions(Element(z, CC)))254make_entry(ID("82c83f"),255 Formula(Equal(Sin(Conjugate(z)), Conjugate(Sin(z)))),256 Variables(z),257 Assumptions(Element(z, CC)))258make_entry(ID("6a8889"),259 Formula(Equal(Sin(z + 2*Pi*k), Sin(z))),260 Variables(z, k),261 Assumptions(And(Element(z, CC), Element(k, ZZ))))262make_entry(ID("393b62"),263 Formula(Equal(Sin(z + Pi*k), (-1)**k * Sin(z))),264 Variables(z, k),265 Assumptions(And(Element(z, CC), Element(k, ZZ))))266make_entry(ID("1c22f1"),267 Formula(Equal(Sin(Pi + z), -Sin(z))),268 Variables(z),269 Assumptions(Element(z, CC)))270make_entry(ID("9cc0f2"),271 Formula(Equal(Sin(Pi - z), Sin(z))),272 Variables(z),273 Assumptions(Element(z, CC)))274make_entry(ID("bae475"),275 Formula(Equal(Sin(Pi/2 + z), Cos(z))),276 Variables(z),277 Assumptions(Element(z, CC)))278make_entry(ID("da58f7"),279 Formula(Equal(Sin(Pi/2 - z), Cos(z))),280 Variables(z),281 Assumptions(Element(z, CC)))282# Addition and multiplication formulas283make_entry(ID("742943"),284 Formula(Equal(Sin(a+b), Sin(a)*Cos(b) + Cos(a)*Sin(b))),285 Variables(a, b),286 Assumptions(And(Element(a, CC), Element(b, CC))))287make_entry(ID("508e2c"),288 Formula(Equal(Sin(a-b), Sin(a)*Cos(b) - Cos(a)*Sin(b))),289 Variables(a, b),290 Assumptions(And(Element(a, CC), Element(b, CC))))291make_entry(ID("3b839c"),292 Formula(Equal(Sin(a+b*ConstI), Sin(a)*Cosh(b) + ConstI*Cos(a)*Sinh(b))),293 Variables(a, b),294 Assumptions(And(Element(a, CC), Element(b, CC))))295make_entry(ID("755655"),296 Formula(Equal(Sin(ConstI*z), ConstI*Sinh(z))),297 Variables(z),298 Assumptions(Element(z, CC)))299make_entry(ID("1b11be"),300 Formula(Equal(Sin(2*z), 2*Sin(z)*Cos(z))),301 Variables(z),302 Assumptions(Element(z, CC)))303make_entry(ID("729215"),304 Formula(Equal(Sin(3*z), 3*Sin(z) - 4*Sin(z)**3)),305 Variables(z),306 Assumptions(Element(z, CC)))307make_entry(ID("e3f8a4"),308 Formula(Equal(Sin(n*z), Sum((-1)**k * Binomial(n, 2*k+1) * Cos(z)**(n-2*k-1) * Sin(z)**(2*k+1), For(k, 0, Floor((n-1)/2))))),309 Variables(n, z),310 Assumptions(And(Element(z, CC), Element(n, ZZGreaterEqual(0)))))311make_entry(ID("d59bd9"),312 Formula(Equal(Sin(a) + Sin(b), 2*Sin((a+b)/2)*Cos((a-b)/2))),313 Variables(a, b),314 Assumptions(And(Element(a, CC), Element(b, CC))))315make_entry(ID("e69cf6"),316 Formula(Equal(Sin(a) - Sin(b), 2*Cos((a+b)/2)*Sin((a-b)/2))),317 Variables(a, b),318 Assumptions(And(Element(a, CC), Element(b, CC))))319make_entry(ID("ad6c1c"),320 Formula(Equal(Sin(a)*Sin(b), (Cos(a-b) - Cos(a+b))/2)),321 Variables(a, b),322 Assumptions(And(Element(a, CC), Element(b, CC))))323make_entry(ID("012eba"),324 Formula(Equal(Sin(a)*Cos(b), (Sin(a+b) + Sin(a-b))/2)),325 Variables(a, b),326 Assumptions(And(Element(a, CC), Element(b, CC))))327make_entry(ID("f183d0"),328 Formula(Equal(Sin(z) + Cos(z), Sqrt(2) * Sin(z + Pi / 4))),329 Variables(z),330 Assumptions(Element(z, CC)))331make_entry(ID("6c3ba9"),332 Formula(Equal(Sin(z) - Cos(z), Sqrt(2) * Sin(z - Pi / 4))),333 Variables(z),334 Assumptions(Element(z, CC)))335make_entry(ID("adbc1a"),336 Formula(Equal(Cos(z) + ConstI * Sin(z), Exp(ConstI*z))),337 Variables(z),338 Assumptions(Element(z, CC)))339# Powers340make_entry(ID("4948ea"),341 Formula(Equal(Sin(z)**2 + Cos(z)**2, 1)),342 Variables(z),343 Assumptions(Element(z, CC)))344make_entry(ID("954066"),345 Formula(Equal(Sin(z)**2 - Cos(z)**2, -Cos(2*z))),346 Variables(z),347 Assumptions(Element(z, CC)))348make_entry(ID("244127"),349 Formula(Equal(Sin(z)**2, 1 - Cos(z)**2)),350 Variables(z),351 Assumptions(Element(z, CC)))352make_entry(ID("cf6e35"),353 Formula(Equal(Sin(z)**2, (1 - Cos(2*z))/2)),354 Variables(z),355 Assumptions(Element(z, CC)))356make_entry(ID("acf63c"),357 Formula(Equal(Sin(z)**2, Tan(z)**2 / (1 + Tan(z)**2))),358 Variables(z),359 Assumptions(And(Element(z, CC),360 NotElement(z, Set((2*n+1)*Pi/2, ForElement(n, ZZ))))))361make_entry(ID("2a6702"),362 Formula(Equal(Sin(z)**3, (3*Sin(z) - Sin(3*z))/4)),363 Variables(z),364 Assumptions(Element(z, CC)))365make_entry(ID("54f420"),366 Formula(Equal(Sin(z)**(2*n), 1/4**n * Binomial(2*n, n) + 2/4**n * Sum((-1)**(n+k) * Binomial(2*n, k) * Cos(2*(n-k)*z), For(k, 0, n-1)))),367 Variables(z, n),368 Assumptions(And(Element(z, CC), Element(n, ZZGreaterEqual(0)))))369make_entry(ID("71a264"),370 Formula(Equal(Sin(z)**(2*n+1), 1/4**n * Sum((-1)**(n+k) * Binomial(2*n+1, k) * Sin((2*n-2*k+1)*z), For(k, 0, n)))),371 Variables(z, n),372 Assumptions(And(Element(z, CC), Element(n, ZZGreaterEqual(0)))))373make_entry(ID("d0505f"),374 Formula(Equal((Cos(z) + ConstI * Sin(z))**n, Cos(n*z) + ConstI*Sin(n*z))),375 Variables(z, n),376 Assumptions(And(Element(z, CC), Element(n, ZZ))))377make_entry(ID("2392f5"),378 Formula(Equal(Sin(a)**2 - Sin(b)**2, Sin(a+b)*Sin(a-b))),379 Variables(a, b),380 Assumptions(And(Element(a, CC), Element(b, CC))))381make_entry(ID("f6d0c6"),382 Formula(Equal(Sin(a)**2 - Cos(b)**2, -Cos(a+b)*Cos(a-b))),383 Variables(a, b),384 Assumptions(And(Element(a, CC), Element(b, CC))))385# Sums and products386make_entry(ID("b8ab9c"),387 Formula(Equal(Sum(Sin(2*a*k+b), For(k, 0, n)), Sin(a*(n+1)) * Sin(a*n+b) / Sin(a))),388 Variables(a, b, n),389 Assumptions(And(Element(n, ZZGreaterEqual(0)), Element(a, CC), Element(b, CC), NotElement(a / Pi, ZZ))))390make_entry(ID("906569"),391 Formula(Equal(Product(Sin(k*Pi/n), For(k, 1, n-1)), n/2**(n-1))),392 Variables(n),393 Assumptions(Element(n, ZZGreaterEqual(1))))394# Representations through other functions395make_entry(ID("925e5b"),396 Formula(Equal(Sin(z), Cos(Pi/2-z), Cos(z-Pi/2), -Cos(z+Pi/2))),397 Variables(z),398 Assumptions(Element(z, CC)))399make_entry(ID("3fb3ca"),400 Formula(Equal(Sin(z), (2*Tan(z/2))/(Tan(z/2)**2 + 1))),401 Variables(z),402 Assumptions(And(Element(z, CC), NotElement(z, Set((2*n+1)*Pi, ForElement(n, ZZ)))),403 And(Element(z, PowerSeries(CC, SerX)), NotElement(z, Set((2*n+1)*Pi, ForElement(n, ZZ))))))404make_entry(ID("18f40c"),405 Formula(Equal(Sin(z), (Exp(ConstI*z) - Exp(-ConstI*z)) / (2 * ConstI))),406 Variables(z),407 Assumptions(Element(z, CC)))408make_entry(ID("299209"),409 Formula(Equal(Sin(x), Im(Exp(ConstI*x)))),410 Variables(x),411 Assumptions(Element(x, RR)))412make_entry(ID("cfc5c3"),413 Formula(Equal(Sin(z), -ConstI * Sinh(ConstI * z))),414 Variables(z),415 Assumptions(Element(z, CC)))416make_entry(ID("54daa9"),417 Formula(Equal(Sin(z), z * Hypergeometric0F1(Div(3,2), -Div(1,4) * z**2))),418 Variables(z),419 Assumptions(Element(z, CC)))420make_entry(ID("0fbd15"),421 Formula(Equal(Sin(z), Sqrt(Pi * z / 2) * BesselJ(Div(1,2), z))),422 Variables(z),423 Assumptions(Element(z, CC)))424# todo: cos: 1/2+z, 1/2-z425make_entry(ID("d38a03"),426 Formula(Equal(Sin(Pi * z), Pi / (Gamma(z) * Gamma(1 - z)))),427 Variables(z),428 Assumptions(Element(z, CC)))429# Complex parts430make_entry(ID("729b70"),431 Formula(Equal(Re(Sin(x+ConstI*y)), Sin(x)*Cosh(y))),432 Variables(x, y),433 Assumptions(And(Element(x, RR), Element(y, RR))))434make_entry(ID("037a6e"),435 Formula(Equal(Im(Sin(x+ConstI*y)), Cos(x)*Sinh(y))),436 Variables(x, y),437 Assumptions(And(Element(x, RR), Element(y, RR))))438make_entry(ID("abaf91"),439# Formula(Equal(Abs(Sin(x+ConstI*y)), Sqrt(Sin(x)**2*Cosh(y)**2 + Cos(x)**2*Sinh(y)**2))),440 Formula(Equal(Abs(Sin(x+ConstI*y)), Sqrt(Sin(x)**2 + Sinh(y)**2))),441 Variables(x, y),442 Assumptions(And(Element(x, RR), Element(y, RR))))443# Derivatives and integrals444make_entry(ID("f7ab32"),445 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, 1)), Cos(z))),446 Variables(z),447 Assumptions(Element(z, CC)))448make_entry(ID("297b3c"),449 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, 2)), -Sin(z))),450 Variables(z),451 Assumptions(Element(z, CC)))452make_entry(ID("612b21"),453 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, r)), Sin(z + Pi*r/2))),454 Variables(z, r),455 Assumptions(And(Element(z, CC), Element(r, ZZGreaterEqual(0)))))456make_entry(ID("a6667d"),457 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, r+2)), -ComplexDerivative(Sin(z), For(z, z, r)))),458 Variables(z, r),459 Assumptions(And(Element(z, CC), Element(r, ZZGreaterEqual(0)))))460make_entry(ID("d81355"),461 Formula(Equal(ComplexDerivative(Sin(z), For(z, z, r+4)), ComplexDerivative(Sin(z), For(z, z, r)))),462 Variables(z, r),463 Assumptions(And(Element(z, CC), Element(r, ZZGreaterEqual(0)))))464make_entry(ID("c93b81"),465 Formula(Equal(Integral(Sin(z), For(z, a, b)), Cos(a) - Cos(b))),466 Variables(a, b),467 Assumptions(And(Element(a, CC), Element(b, CC))))468#make_entry(ID("3c7c4c"),469# Formula(Equal(Integral(z * Sin(z), For(z, a, b)), Parentheses(Sin(b)-b*Cos(b)) - (Sin(a)-a*Cos(a)))),470# Variables(a, b),471# Assumptions(And(Element(a, CC), Element(b, CC))))472# Series expansions473make_entry(ID("f340cb"),474 Formula(Equal(Sin(z), Sum((-1)**k * (z**(2*k+1) / Factorial(2*k+1)), For(k, 0, Infinity)))),475 Variables(z),476 Assumptions(Element(z, CC)))477make_entry(ID("6b13be"),478 Formula(Equal(Sin(z + x), Sum(Sin(z + Pi * k / 2) * (x**k / Factorial(k)), For(k, 0, Infinity)))),479 Variables(z, x),480 Assumptions(And(Element(z, CC), Element(x, CC))))481make_entry(ID("11687b"),482 Formula(Equal(Sin(z), z * Product(Parentheses(1 - z**2 / (Pi**2 * k**2)), For(k, 1, Infinity)))),483 Variables(z),484 Assumptions(Element(z, CC)))485# Bounds and inequalities486make_entry(ID("4039ec"),487 Formula(LessEqual(Abs(Sin(x)), 1)),488 Variables(x),489 Assumptions(Element(x, RR)))490make_entry(ID("c47a86"),491 Formula(LessEqual(Abs(Sin(x)), Abs(x))),492 Variables(x),493 Assumptions(Element(x, RR)))494make_entry(ID("22c4f6"),495 Formula(LessEqual(Sin(x), (4*x*(Pi-x))/(Pi**2))),496 Variables(x),497 Assumptions(Element(x, ClosedInterval(0, Pi))))498make_entry(ID("d38739"),499 Formula(GreaterEqual(Sin(x), (x*(Pi-x))/(Pi))),500 Variables(x),501 Assumptions(Element(x, ClosedInterval(0, Pi))))502make_entry(ID("f77752"),503 Formula(LessEqual(Abs(Sin(x+y*ConstI)), Cosh(y))),504 Variables(x, y),505 Assumptions(And(Element(x, RR), Element(y, RR))))506make_entry(ID("dd5787"),507 Formula(LessEqual(Abs(Sin(x+y*ConstI)), Exp(Abs(y)))),508 Variables(x, y),509 Assumptions(And(Element(x, RR), Element(y, RR))))510make_entry(ID("3dd162"),511 Formula(GreaterEqual(Abs(Sin(x+y*ConstI)), Sinh(Abs(y)))),512 Variables(x, y),513 Assumptions(And(Element(x, RR), Element(y, RR))))514make_entry(ID("092377"),515 Formula(GreaterEqual(Abs(Sin(x+y*ConstI)), Abs(y))),516 Variables(x, y),517 Assumptions(And(Element(x, RR), Element(y, RR))))518make_entry(ID("1721bf"),519 Formula(LessEqual(Abs(Sin(z)), Sinh(Abs(z)))),520 Variables(z),521 Assumptions(Element(z, CC)))522make_entry(ID("941a86"),523 Formula(Less(Abs(Sin(z)), Exp(Abs(z)))),524 Variables(z),525 Assumptions(Element(z, CC)))526make_entry(ID("f3a901"),527 Formula(LessEqual(Abs(Sin(x + y) - Sin(x)), 2)),528 Variables(x, y),529 Assumptions(And(Element(x, RR), Element(y, RR))))530make_entry(ID("03f713"),531 Formula(LessEqual(Abs(Sin(x + y) - Sin(x)), Abs(y))),532 Variables(x, y),...

Full Screen

Full Screen

pi.py

Source:pi.py Github

copy

Full Screen

...124 "4c0698",125 "13c539", # from agm126 ),127)128make_entry(ID("b5d706"),129 SymbolDefinition(Pi, Pi, "The constant pi (3.14...)"),130 Description("The real number giving the ratio of a circle's circumference to its diameter."))131# Numerical value132make_entry(ID("6505a9"),133 Formula(Element(Pi,134 RealBall(Decimal("3.1415926535897932384626433832795028841971693993751"), Decimal("5.83e-51")))))135make_entry(ID("47acde"),136 Description("Table of simple expressions involving", Pi, "to 50 digits"),137 Table(138 Var(x),139 TableValueHeadings(x, NearestDecimal(x, 50)),140 TableSplit(1),141 List(142 Tuple(Pi, Decimal("3.1415926535897932384626433832795028841971693993751")),143 Tuple(2*Pi, Decimal("6.2831853071795864769252867665590057683943387987502")),144 Tuple(3*Pi, Decimal("9.4247779607693797153879301498385086525915081981253")),145 Tuple(4*Pi, Decimal("12.566370614359172953850573533118011536788677597500")),146 Tuple(Pi/2, Decimal("1.5707963267948966192313216916397514420985846996876")),147 Tuple(3*Pi/2, Decimal("4.7123889803846898576939650749192543262957540990627")),148 Tuple(Pi/3, Decimal("1.0471975511965977461542144610931676280657231331250")),149 Tuple(2*Pi/3, Decimal("2.0943951023931954923084289221863352561314462662501")),150 Tuple(Pi/4, Decimal("0.78539816339744830961566084581987572104929234984378")),151 Tuple(3*Pi/4, Decimal("2.3561944901923449288469825374596271631478770495313")),152 Tuple(Pi/5, Decimal("0.62831853071795864769252867665590057683943387987502")),153 Tuple(2*Pi/5, Decimal("1.2566370614359172953850573533118011536788677597500")),154 Tuple(3*Pi/5, Decimal("1.8849555921538759430775860299677017305183016396251")),155 Tuple(4*Pi/5, Decimal("2.5132741228718345907701147066236023073577355195001")),156 Tuple(Pi/6, Decimal("0.52359877559829887307710723054658381403286156656252")),157 Tuple(5*Pi/6, Decimal("2.6179938779914943653855361527329190701643078328126")),158 Tuple(1/Pi, Decimal("0.31830988618379067153776752674502872406891929148091")),159 Tuple(2/Pi, Decimal("0.63661977236758134307553505349005744813783858296183")),160 Tuple(1/(2*Pi), Decimal("0.15915494309189533576888376337251436203445964574046")),161 Tuple(Pi**2, Decimal("9.8696044010893586188344909998761511353136994072408")),162 Tuple((2*Pi)**2, Decimal("39.478417604357434475337963999504604541254797628963")),163 Tuple(Pi**2/2, Decimal("4.9348022005446793094172454999380755676568497036204")),164 Tuple(Pi**2/4, Decimal("2.4674011002723396547086227499690377838284248518102")),165 Tuple(Pi**2/6, Decimal("1.6449340668482264364724151666460251892189499012068")),166 Tuple(1/Pi**2, Decimal("0.10132118364233777144387946320972763890435877467225")),167 Tuple(1/(2*Pi)**2, Decimal("0.025330295910584442860969865802431909726089693668062")),168 Tuple(Pi**3, Decimal("31.006276680299820175476315067101395202225288565885")),169 Tuple(Pi**4, Decimal("97.409091034002437236440332688705111249727585672685")),170 Tuple(Sqrt(Pi), Decimal("1.7724538509055160272981674833411451827975494561224")),171 Tuple(Sqrt(2*Pi), Decimal("2.5066282746310005024157652848110452530069867406099")),172 Tuple(1/Sqrt(Pi), Decimal("0.56418958354775628694807945156077258584405062932900")),173 Tuple(1/Sqrt(2*Pi), Decimal("0.39894228040143267793994605993438186847585863116493")),174 Tuple(Log(Pi), Decimal("1.1447298858494001741434273513530587116472948129153")),175 Tuple(Log(2*Pi), Decimal("1.8378770664093454835606594728112352797227949472756")),176 Tuple(Div(1,2)*Log(2*Pi), Decimal("0.91893853320467274178032973640561763986139747363778")),177 Tuple(Exp(Pi), Decimal("23.140692632779269005729086367948547380266106242600")),178 Tuple(Exp(Pi/2), Decimal("4.8104773809653516554730356667038331263901708746645")),179 Tuple(Exp(2*Pi), Decimal("535.49165552476473650304932958904718147780579760329")),180 Tuple(Exp(-Pi), Decimal("0.043213918263772249774417737171728011275728109810633")),181 Tuple(Exp(-(Pi/2)), Decimal("0.20787957635076190854695561983497877003387784163177")),182 Tuple(Exp(-(2*Pi)), Decimal("0.0018674427317079888144302129348270303934228050024753")),183 Tuple(Exp(Pi) - Pi, Decimal("19.999099979189475767266442984669044496068936843225")),184)))185make_entry(ID("0c838a"),186 Formula(NotElement(Pi, QQ)))187make_entry(ID("155575"),188 Formula(NotElement(Pi, AlgebraicNumbers)))189# Euler's identity190make_entry(ID("271314"),191 Formula(Equal(Exp(Pi*ConstI) + 1, 0)))192# Elementary function representations193make_entry(ID("0c9939"),194 Formula(Equal(Pi, 4*Atan(1))))195make_entry(ID("3ff35f"),196 Formula(Equal(Pi, 2*Acos(0))))197make_entry(ID("722241"),198 Formula(Equal(Pi, 2*Asin(1))))199make_entry(ID("b89166"),200 Formula(Equal(Pi, UniqueZero(Sin(x), ForElement(x, ClosedInterval(3, 4))))))201make_entry(ID("590136"),202 Formula(Equal(Pi, -(ConstI * Log(-1)))))203make_entry(ID("030560"),204 Formula(Equal(Pi, 10*Asin(1/(2*GoldenRatio)))))205make_entry(ID("f8d280"),206 Formula(Equal(Pi, 16*Atan(Div(1,5)) - 4*Atan(Div(1,239)))))207make_entry(ID("cbf396"),208 Formula(Equal(Pi, 4*Atan(Div(1,2)) + 4*Atan(Div(1,3)))))209make_entry(ID("b1357b"),210 Formula(Equal(Pi, 8*Atan(Div(1,2)) - 4*Atan(Div(1,7)))))211make_entry(ID("0644b6"),212 Formula(Equal(Pi, 8*Atan(Div(1,3)) + 4*Atan(Div(1,7)))))213make_entry(ID("5278da"),214 Formula(Equal(Pi, 4*Atan(Div(1,2)) + 4*Atan(Div(1,5)) + 4*Atan(Div(1,8)))))215make_entry(ID("7ce79e"),216 Formula(Equal(Pi, 4*Atan(Div(1,3)) + 4*Atan(Div(1,4)) + 4*Atan(Div(1,7)) + 4*Atan(Div(1,13)))))217make_entry(ID("8332d8"),218 Formula(Equal(Pi, 48*Atan(Div(1,49))+128*Atan(Div(1,57))-20*Atan(Div(1,239))+48*Atan(Div(1,110443)))))219# Integral representations220make_entry(ID("464961"),221 Formula(Equal(Pi, 2 * Integral(Sqrt(1-x**2), For(x, -1, 1)))))222make_entry(ID("fc8149"),223 Formula(Equal(Pi, Integral(1/Sqrt(1-x**2), For(x, -1, 1)))))224make_entry(ID("04cd99"),225 Formula(Equal(Pi, Integral(1/(x**2+1), For(x, -Infinity, Infinity)))))226make_entry(ID("dae4a7"),227 Formula(Equal(Pi, Integral(Exp(-x**2), For(x, -Infinity, Infinity))**2)))228make_entry(ID("81f500"),229 Formula(Equal(Pi, Div(22,7) - Integral(x**4*(1-x)**4/(1+x**2), For(x, 0, 1)))))230make_entry(ID("bd3faa"),231 Formula(Equal(Pi, Div(355,113) - Div(1,3164) * Integral(x**8*(1-x)**8*(25+816*x**2)/(1+x**2), For(x, 0, 1)))),232 References("https://mathworld.wolfram.com/PiFormulas.html"))233make_entry(ID("9a3503"),234 Formula(Equal(Pi, Integral(Sinc(x), For(x, -Infinity, Infinity)))))235make_entry(ID("8107d6"),236 Formula(Equal(Pi, Integral(Sinc(x)**2, For(x, -Infinity, Infinity)))))237make_entry(ID("5033c7"),238 Formula(Equal(Pi, 2 * ConstE * Integral(Cos(x) / (x**2+1), For(x, 0, Infinity)))))239make_entry(ID("6ed553"),240 Formula(Equal(Pi, 8 * Integral(Sin(x**2), For(x, 0, Infinity))**2)))241make_entry(ID("859856"),242 Formula(Equal(Pi, 8 * Integral(Cos(x**2), For(x, 0, Infinity))**2)))243make_entry(ID("d8cb3e"),244 Formula(Equal(Pi, Integral(JacobiTheta(2,0,ConstI*t), For(t, 0, Infinity)))))245make_entry(ID("e00d9e"),246 Formula(Equal(Pi, 3 * Integral(Parentheses(JacobiTheta(3,0,ConstI*t)-1), For(t, 0, Infinity)))))247# Series representations248make_entry(ID("f617c0"),249 Formula(Equal(Pi, 4*Sum((-1)**n / (2*n+1), For(n, 0, Infinity)))))250make_entry(ID("93831d"),251 Formula(Equal(Pi, Sum((2**(n+1) * Factorial(n)**2) / Factorial(2*n+1), For(n, 0, Infinity)))))252make_entry(ID("419b45"),253 Formula(Equal(Pi, Sum(Factorial(n) / DoubleFactorial(2*n+1), For(n, 0, Infinity)))))254make_entry(ID("fddfe6"),255 Formula(Equal(Pi, Sum((1 / 16**n) * (4/(8*n+1)-2/(8*n+4)-1/(8*n+5)-1/(8*n+6)), For(n, 0, Infinity)))),256 References("D. H. Bailey and P. B. Borwein and S. Plouffe (1997). On the rapid computation of various polylogarithmic constants. Mathematics of Computation. vol 66, no 218, p. 903–913. DOI:10.1090/S0025-5718-97-00856-9"))257make_entry(ID("6b9f81"),258 Formula(Equal(1/Pi,259 (2*Sqrt(2))/9801 * Sum((Factorial(4*n) * (1103+26390*n))/(Factorial(n)**4 * 396**(4*n)), For(n, 0, Infinity)))))260make_entry(ID("57fcaf"),261 Formula(Equal(1/Pi,262 12*Sum((-1)**n*Factorial(6*n)*(13591409+545140134*n)/(Factorial(3*n)*Factorial(n)**3*640320**(3*n+Div(3,2))),263 For(n, 0, Infinity)))))264make_entry(ID("0479f5"),265 Formula(Equal(Pi, 72*Sum(1/(n*(Exp(Pi*n)-1)), For(n, 1, Infinity)) - 96*Sum(1/(n*(Exp(2*Pi*n)-1)), For(n, 1, Infinity)) + 24*Sum(1/(n*(Exp(4*Pi*n)-1)), For(n, 1, Infinity)))),266 References("http://www.lacim.uqam.ca/~plouffe/inspired2.pdf"))267make_entry(ID("338055"),268 Formula(Equal(Pi, 8 * Sum(1/((4*n+1)*(4*n+3)), For(n, 0, Infinity)))))269make_entry(ID("fbc53d"),270 Formula(Equal(Pi**2 / 6, Sum(1/n**2, For(n, 1, Infinity)))))271make_entry(ID("11302a"),272 Formula(Equal(Pi**2 / 12, Sum((-1)**(n+1)/n**2, For(n, 1, Infinity)))))273make_entry(ID("9bf21b"),274 Formula(Equal(Pi**4 / 90, Sum(1/n**4, For(n, 1, Infinity)))))275make_entry(ID("8dff72"),276 Formula(Equal(Pi, 2 * Sum(Atan(1/(n**2+n+1)), For(n, 0, Infinity)))))277make_entry(ID("31eecc"),278 Formula(Equal(Pi, 2 * Sum(Atan(1/Fibonacci(2*n+1)), For(n, 0, Infinity)))))279make_entry(ID("bad5d9"),280 Formula(Equal(Pi, Sqrt(3) * (3 * Sum((-1)**n / (3*n+1), For(n, 0, Infinity)) - Log(2)))))281make_entry(ID("54c80d"),282 Formula(Equal(Pi, 4*Sqrt(2) * Sum((-1)**n / (4*n+1), For(n, 0, Infinity)) - 2*Log(1+Sqrt(2)))))283make_entry(ID("f78fa0"),284 Formula(Equal(Pi, Sqrt(3) * (Div(9,2) * Sum(1/Binomial(2*n,n), For(n, 0, Infinity)) - 6))))285make_entry(ID("dbdf08"),286 Formula(Equal(Pi, Sqrt(3) * (Div(9,2) * Sum(n/Binomial(2*n,n), For(n, 1, Infinity)) - 3))))287make_entry(ID("a2e6f9"),288 Formula(Equal(Pi, Sum((3**n-1)*RiemannZeta(n+1) / 4**n, For(n, 1, Infinity)))))289# Product representations290make_entry(ID("69fe63"),291 Formula(Equal(Pi, 2*Product((4*n**2)/(4*n**2-1), For(n, 1, Infinity)))))292make_entry(ID("490cf4"),293 Formula(Equal(Pi, 2*Product(Sec(Pi/2**n), For(n, 2, Infinity)))))294make_entry(ID("a91200"),295 Formula(Equal(Pi**2/6, PrimeProduct((1-1/p**2)**(-1), For(p)))))296# todo: semantic representation of recurrence297make_entry(ID("6fce07"),298 Formula(Equal(2 / Pi, Where(Product(a_(n) / 2, For(n, 1, Infinity)), Def(a_(1), Sqrt(2)), Def(a_(n), Sqrt(2 + a_(n-1)))))))299# Limit representations300make_entry(ID("dea83d"),301 Formula(Equal(Pi, SequenceLimit((4/n**2) * Sum(Sqrt(n**2-k**2), For(k, 0, n)), For(n, Infinity)))))302make_entry(ID("e1e106"),303 Formula(Equal(Pi, SequenceLimit(16**n/(n*Binomial(2*n,n)**2), For(n, Infinity)))))304make_entry(ID("420007"),305 Formula(Equal(Pi, SequenceLimit(Div(1,2) * ((-1)**(n+1) * (Factorial(2*n) / BernoulliB(2*n)))**(1/Parentheses(2*n)), For(n, Infinity)))))306make_entry(ID("220e8d"),307 Formula(Equal(3/Pi**2, SequenceLimit(Mul(Div(1, Pow(N, 2)), Sum(Totient(n), For(n, 1, N))), For(N, Infinity)))))308# Special function representations309make_entry(ID("8fab22"),310 Formula(Equal(Pi, Gamma(Div(1, 2))**2)))311make_entry(ID("2371b9"),312 Formula(Equal(Pi, (Sqrt(3) / 2) * (Gamma(Div(1,3)) * Gamma(Div(2,3))))))313make_entry(ID("63ba30"),314 Formula(Equal(Pi, (1 / Sqrt(2)) * (Gamma(Div(1,4)) * Gamma(Div(3,4))))))315make_entry(ID("67bb53"),316 Formula(Equal(Pi, Sqrt(6 * RiemannZeta(2)))))317make_entry(ID("591d64"),318 Formula(Equal(Pi, BetaFunction(Div(1,2), Div(1,2)))))319make_entry(ID("033c51"),320 Formula(Equal(Pi, EisensteinG(2, ConstI))))321make_entry(ID("dabb47"),322 Formula(Equal(Pi, Div(1,2) * Gamma(Div(1,4))**Div(4,3) * AGM(1, Sqrt(2))**Div(2,3))))323make_entry(ID("ce5423"),324 Formula(Equal(Pi, 2 * EllipticK(0))))325make_entry(ID("07e35f"),326 Formula(Equal(Pi, 2 * EllipticE(0))))327make_entry(ID("9206a3"),328 Formula(Equal(Pi, Sqrt(6 * PolyLog(2, 1)))))329make_entry(ID("1448e3"),330 Formula(Equal(Pi, 2 * Hypergeometric2F1(Div(1,2), Div(1,2), Div(3,2), 1))))331make_entry(ID("a7095f"),332 Formula(Equal(1 / Pi, Div(1,2) * Hypergeometric2F1(Div(1,2),-Div(1,2),1,1))))333make_entry(ID("c6c108"),334 Formula(Equal(1 / Pi, Div(1,4) * Hypergeometric2F1(-Div(1,2),-Div(1,2),1,1))))335make_entry(ID("2a0316"),336 Formula(Equal(Pi, 2 * Hypergeometric2F1(-Div(1,2),-Div(1,2),Div(1,2),1))))337make_entry(ID("f55b36"),338 Formula(Equal(Pi, 4 * (Hypergeometric2F1(-Div(1,2),1,Div(1,2),-1)-1))))339make_entry(ID("769f6e"),340 Formula(Equal(Pi, 2 * Hypergeometric2F1(1,1,Div(1,2),Div(1,2))-4)))341make_entry(ID("488a30"),342 Formula(Equal(Pi, 4*(Sqrt(2)*Hypergeometric2F1(-Div(1,2),-Div(1,2),Div(1,2),Div(1,2))-1))))343make_entry(ID("826257"),344 Formula(Equal(Pi, Sqrt(3)*(Div(9,2) * Hypergeometric2F1(1,1,Div(1,2),Div(1,4)) - 6))))345make_entry(ID("3d276b"),346 Formula(Equal(Pi, 12 * Hypergeometric2F1(-Div(1,2),-Div(1,2),Div(1,2),Div(1,4)) - 6*Sqrt(3))))347make_entry(ID("2806fd"),348 Formula(Equal(Pi, (9/(2*Sqrt(3)) *Hypergeometric2F1(1, 1, Div(3,2), 1/4)))))349make_entry(ID("68b73d"),350 Formula(Equal(1/Pi, (2*Sqrt(3))/9 * Hypergeometric2F1(-Div(1,3),Div(1,3),1,1))))351make_entry(ID("42d727"),352 Formula(Equal(Pi, (5 * Sqrt(GoldenRatio + 2)) / (2 * GoldenRatio) * Hypergeometric2F1(1, 1, Div(3,2), 1/(2*GoldenRatio)**2))))353make_entry(ID("8ee7c9"),354 Formula(Equal(Pi, Sqrt(DigammaFunction(Div(1,4), 1) - 8*ConstCatalan))))355# todo: 2*catalan/dirichlet(-1,[0,1,0,-1],1)356make_entry(ID("f56273"),357 Formula(Equal(Pi, (4 * DirichletL(1, DirichletCharacter(4,3))))))358# Approximations359make_entry(ID("2516c2"),360 Formula(Less(Abs(Pi - Div(22,7)), Decimal("0.00127"))))361make_entry(ID("1e3a25"),362 Formula(Less(Abs(Pi - Div(355,113)), Decimal("2.67e-7"))))363make_entry(ID("fdc3a3"),364 Formula(Less(Abs(Pi - Log(Pow(640320,3)+744)/Sqrt(163)), Decimal("2.24e-31"))))365make_entry(ID("4c0698"),366 Formula(Less(Abs(1/Pi -367 Parentheses(12*Sum((-1)**n*Factorial(6*n)*(13591409+545140134*n)/(Factorial(3*n)*Factorial(n)**3*640320**(3*n+Div(3,2))),368 For(n, 0, N-1)))), Div(1,151931373056000**N))),369 Variables(N),...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful