# - \usepackage[fontsize=11pt]{scrextend}
knitr::opts_chunk$set(echo = TRUE)
library(Ryacas)
packageVersion("Ryacas")

\btwocol

Sums

k <- ysym("k")
s <- sum(1/k^2, "k", 1, Inf)
s
as_r(s)
tex(s)

Also:

\vfill\null

\columnbreak

Solving systems of non-linear equations

x <- ysym("x"); y <- ysym("y")
lhs <- c(3*x*y - y, x)
rhs <- c(-5*x, y + 4)

\vspace{-1em}

[ r tex(lhs[[1]]) = r tex(rhs[[1]]) \quad \text{and} \quad r tex(lhs[[2]]) = r tex(rhs[[2]]) ]

sol <- solve(lhs, rhs, c("x", "y")) 
sol
y_rmvars(sol)

\etwocol

if (FALSE) {
  system2('pdfcrop', c('release-featured-images/v1_1_1.pdf',
                       'release-featured-images/v1_1_1--cropped.pdf'))
  system2('convert', c('-flatten', 
                       '-density 100',
                       '-quality 75', 
                       'release-featured-images/v1_1_1--cropped.pdf',
                       'release-featured-images/v1_1_1.png'))
}


ggrothendieck/ryacas documentation built on July 5, 2023, 10:07 p.m.