Compare commits

...

2 Commits

Author SHA1 Message Date
e2caad3701 Merge branch 'main' of https://git.theschricks.com/noah/CS-7863-Sci-Stat-Proj-2
sync py and r
2023-05-01 00:33:53 -05:00
3003d96dbd test model 2023-05-01 00:33:12 -05:00

View File

@ -111,7 +111,6 @@ fun.2c <- function(x) {3-2*exp(-x)}
fun.2c.fx <- function(x) {x+2*exp(-x)-3} fun.2c.fx <- function(x) {x+2*exp(-x)-3}
fun.2c.string <- "x+2*exp(-x)-3" fun.2c.string <- "x+2*exp(-x)-3"
fun.2c.estimate <- findZeroRelax(fun.2c,-.5) fun.2c.estimate <- findZeroRelax(fun.2c,-.5)
fun.2c.estimate[1]
# Find the other root with bisection # Find the other root with bisection
fun.2c.bisect <- findZeroBisect(fun.2c,-1,0,1e-6) fun.2c.bisect <- findZeroBisect(fun.2c,-1,0,1e-6)
# Plot 2c # Plot 2c
@ -212,7 +211,10 @@ ggplot(data.frame(x=seq(1,80,.1)), aes(x)) +
geom_hline(aes(yintercept=0, col = "y=0"), show.legend=TRUE)+ geom_hline(aes(yintercept=0, col = "y=0"), show.legend=TRUE)+
geom_vline(aes(xintercept=func.five.estimate[1], geom_vline(aes(xintercept=func.five.estimate[1],
col = "bisection estimate"), show.legend=TRUE)+ col = "bisection estimate"), show.legend=TRUE)+
ggtitle("zeroth-order dimensional perturbation theory approximation for the chemical potential of the Gross-Pitaevskii equation in d dimensions") + ggtitle("zeroth-order dimensional
perturbation theory approximation
for the chemical potential of the
Gross-Pitaevskii equation in d dimensions") +
xlab("x") + ylab("y") + xlab("x") + ylab("y") +
theme(text = element_text(size=20), plot.title = element_text(hjust = 0.5)) theme(text = element_text(size=20), plot.title = element_text(hjust = 0.5))
@ -237,6 +239,9 @@ ggplot(data.frame(x=seq(5,80,.1)), aes(x)) +
geom_hline(aes(yintercept=0, col = "y=0"), show.legend=TRUE)+ geom_hline(aes(yintercept=0, col = "y=0"), show.legend=TRUE)+
geom_vline(aes(xintercept=func.five.estimate[1], geom_vline(aes(xintercept=func.five.estimate[1],
col = "bisection estimate"), show.legend=TRUE)+ col = "bisection estimate"), show.legend=TRUE)+
ggtitle("zeroth-order dimensional perturbation theory approximation for the chemical potential of the Gross-Pitaevskii equation in d dimensions") + ggtitle("zeroth-order dimensional
perturbation theory approximation
for the chemical potential of the
Gross-Pitaevskii equation in d dimensions") +
xlab("x") + ylab("y") + xlab("x") + ylab("y") +
theme(text = element_text(size=20), plot.title = element_text(hjust = 0.5)) theme(text = element_text(size=20), plot.title = element_text(hjust = 0.5))