Step 1 Apply Multiply rule \[\left(\frac{64x^3}{y^3}\right)^{-1/2}\] Step2 Apply exponent rule \[\left(\frac{y^3}{64x^3}\right)^{1/2}\] \[\left(\frac{y^{3/2}}{64^{1/2} x^{3/2}}\right)\] \[\left(\frac{y^{3/2}}{8 x^{3/2}}\right)\]
#install.packages('Deriv')
library(Deriv)
exp01 <- expression(((64*x*y^-2)/(x^-2*y))^(-1/2))
Simplify(exp01)
## expression(1/sqrt(64 * (x^3/y^3)))
2 . If \(f(x) =\sqrt{(x+5)} \space and \space {g(x) = {3/x}}\) Find \(f(x) g(x)\)
Step1 : \[(f.g)(x) =f(x).g(x) \] \[(x+5)^{1/2} * {3/x} \]
f <- function(x) sqrt(x + 5)
g <- function(x) 3/x
fxgx <- function(x) 3*sqrt(x+5)/x
fxgx
## function(x) 3*sqrt(x+5)/x
3 . Find the break-even point(s) for the revenue and cost functions below.
\[R(x) = 24.2x-0.2x^2 \] \[C(x) = 13x+147 \]
library(mosaic)
## Loading required package: dplyr
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
## Loading required package: lattice
## Loading required package: ggformula
## Loading required package: ggplot2
##
## New to ggformula? Try the tutorials:
## learnr::run_tutorial("introduction", package = "ggformula")
## learnr::run_tutorial("refining", package = "ggformula")
## Loading required package: mosaicData
## Loading required package: Matrix
##
## The 'mosaic' package masks several functions from core packages in order to add
## additional features. The original behavior of these functions should not be affected by this.
##
## Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.
##
## Attaching package: 'mosaic'
## The following object is masked from 'package:Matrix':
##
## mean
## The following objects are masked from 'package:dplyr':
##
## count, do, tally
## The following objects are masked from 'package:stats':
##
## binom.test, cor, cor.test, cov, fivenum, IQR, median,
## prop.test, quantile, sd, t.test, var
## The following objects are masked from 'package:base':
##
## max, mean, min, prod, range, sample, sum
revenueFn <- function(x) { 24.2 * x - .2 * x ^ 2}
costFn <- function(x) { 13*x + 147}
breakEven = function(x) (24.2 * x - .2 * x ^ 2 - 13*x - 147)
mosaic::findZeros(breakEven(x)~x)
## x
## 1 21
## 2 35
4 . Find the derivative for the following function \(y = 9x^{8.2}\)
function04 = function(x) 9*x^8.2
Deriv::Deriv(function04)
## function (x)
## 73.8 * x^7.2
5 . Find the derivative for \(f(x) = -4x^5-3x^4-4x^3-3\)
function05 = function(x) -4*x^5-3*x^4-4*x^3-3
Deriv::Deriv(function05)
## function (x)
## -(x^2 * (3 * (4 + x * (3 + 4 * x)) + x * (3 + 8 * x)))
6 . A pole that is 4264 feet long is leaning against a building. The bottom of the pole is moving away from the wall at a rate of 2 ft./sec. How fast is the top of the pole moving down the wall when the top is 3480 feet off the ground? \[x^2+y^2 =( 4264)^2 \] \[x^2+y^2 = (4264)^2 \] \[2x\frac{dx}{dt}+2y\frac{dy}{dt} = 0\] \[\frac{dy}{dt} = -\frac{x}{y} \frac{dx}{dt}\] \[x = \sqrt{(4264^2-3480^2)} \]
x = sqrt(4264^2-3480^2)
x
## [1] 2464
\[\frac{dy}{dt} = - {(2464/3480)} * 2 \]
-(2464/3480)*2
## [1] -1.416092
7 . Use the Product Rule or Quotient Rule to find the derivative. \[f(x) = \frac{3x^8 - x^5}{2x^8+2}\]
function07 = function(x) ((3*x^8-x^5)/(2*x^8+2))
Deriv::Deriv(function07)
## function (x)
## {
## .e1 <- x^8
## .e3 <- 2 + 2 * .e1
## .e4 <- x^3
## x^4 * ((3 * .e4 - 1) * (5 - 16 * (.e1/.e3)) + 9 * .e4)/.e3
## }
function08 = function(x) 4*x+25*x^-1
derFn08 = Deriv::Deriv(function08)
derFn08
## function (x)
## 4 - 25/x^2
mosaic::findZeros(derFn08(x)~x)
## x
## 1 -2.5
## 2 2.5
derFn08(-3)
## [1] 1.222222
derFn08(-1)
## [1] -21
derFn08(3)
## [1] 1.222222
localMinFn8 = derFn08(-2.5)
localMinFn8
## [1] 0
localMaxFn8 = derFn08(2.5)
localMaxFn8
## [1] 0
9 . Evaluate \(\frac{dy}{dx}\) at x= 1 for the below function \[{y = -9u^2+7u+4} , {where} \space {u = -3x^3+3x+6}\]
function09 = function(x) {-9*(-3*x^3 + 3*x + 6)^2 + 7 * (-3*x^3 + 3*x + 6) + 4}
dervFn09 = Deriv::Deriv(function09)
dervFn09
## function (x)
## {
## .e1 <- x^2
## (3 - 9 * .e1) * (7 - 18 * (6 + x * (3 - 3 * .e1)))
## }
dervFn09(1)
## [1] 606
10 . Consider the following function: \(f(x) = (x+5) (x+4)^2\)
function10 = function(x) (x+5)*(x+4)^2
firstDerFn10 = Deriv::Deriv(function10)
firstDerFn10
## function (x)
## (2 * (5 + x) + 4 + x) * (4 + x)
secondDerFn10 = Deriv::Deriv(firstDerFn10)
secondDerFn10
## function (x)
## 2 * (5 + x) + 3 * (4 + x) + 4 + x
mosaic::findZeros(firstDerFn10(x) ~ x)
## x
## 1 -4.6666
## 2 -4.0000
firstDerFn10(0)
## [1] 56
firstDerFn10(-4.5)
## [1] -0.25
firstDerFn10(-5)
## [1] 1
#decreasing : (-4.6666, -4)
# increasing : (-infinity, -4.6666), (-4, infinity)
mosaic::findZeros(secondDerFn10(x)~x)
## x
## 1 -4.3333
secondDerFn10(0)
## [1] 26
secondDerFn10(-5)
## [1] -4
#concave up: (-4.3333, infinity)
#concave down: (-infinity, -4.3333)
mosaic::findZeros(firstDerFn10(x)~x)
## x
## 1 -4.6666
## 2 -4.0000
localMin = function10(-4)
localMin
## [1] 0
localMax = function10(-4.6666)
localMax
## [1] 0.1481481
inflectionPoint = mosaic::findZeros(secondDerFn10(x)~x)
inflectionPoint
## x
## 1 -4.3333
11 . Consider the function: \(f(x) = -7x^2-84x-140\)
function11 = function(x) -7*x^2 - 84*x - 140
firstDerFn11 = Deriv::Deriv(function11)
firstDerFn11
## function (x)
## -(14 * x + 84)
secondDerFn11 = Deriv::Deriv(firstDerFn11)
secondDerFn11
## function (x)
## -14
mosaic::findZeros(firstDerFn11(x)~x)
## x
## 1 -6
mosaic::findZeros(secondDerFn11(x)~x)
## Warning in mosaic::findZeros(secondDerFn11(x) ~ x): No zeros found. You
## might try modifying your search window or increasing npts.
## numeric(0)
function11(-6)
## [1] 112
12 . A beauty supply store expects to sell 100 flat irons during the next year. It costs $1.20 to store one flat iron for one year. There is a fixed cost of $15 for each order. Find the lot size and the number of orders per year that will minimize inventory costs.
costFunction12 = function(x) (100/x * 1.2) + (x * (15 + 100/x))
dervCost = Deriv::Deriv(costFunction12)
mosaic::findZeros(dervCost(x)~x)
## x
## 1 -2.8284
## 2 2.8284
costFunction12(2.8284)
## [1] 184.8528
costFunction12(3)
## [1] 185
lotSize <- 100/2.8 # OR lotSize <- 100/3
13 . Find the derivative of the given expression: \(y= \frac{18x}{ln(x)^4}\)
#log is default natural loarithm in R
function13Log = function(x) {(18*x)/(log(x^4))}
Deriv::Deriv(function13Log)
## function (x)
## {
## .e1 <- 4 * log(x)
## 18 * 1/.e1 - 72/.e1^2
## }
14 . Consider the following function: \(f(x)= -5*x^3*e^x\)
myfunction14 = function(x) { -5*x^3*e^x}
firstDerFn14 = Deriv::Deriv(myfunction14)
firstDerFn14
## function (x)
## {
## .e1 <- e^x
## -(5 * (x^2 * (3 * .e1 + .e1 * x * log(e))))
## }
secondDerFn14 = Deriv::Deriv(firstDerFn14)
secondDerFn14
## function (x)
## {
## .e1 <- e^x
## .e2 <- log(e)
## .e4 <- .e1 * x * .e2
## -(5 * (x * ((2 * .e1 + .e4) * (3 + x * .e2) + .e4)))
## }
15 . Evaluate the definite integral below. Write your answer in exact form or rounded to two decimal places. \[\int_{-3}^1 (8^3{\sqrt{(8x+5)^2}}) dx\]
intFn15 = function(x) sqrt((8*x + 5)^2)
integrate(Vectorize(intFn15),-3,1)
## 33.125 with absolute error < 3.7e-13
16 . Solve the differential equation given below \[\frac {dy}{dx} = -4 (-3-y) \]
dydx = function(y) 12 + 4*y
y = function(x) e^(4*x) - 3
17 . The marginal cost of a product is given by \({238}+\frac{298}{\sqrt{x}}\) dollars per unit, where x is the number of units produced. The current level of production is 137 units weekly. If the level of production is increased to 232 units weekly, find the increase in the total costs. Round your answer to the nearest cent
marginalCost = function(x) 238 + (298/sqrt(x))
totalCost = function(x) 238*x + 596*sqrt(x)
totalCost(232) - totalCost(137)
## [1] 24712
18 . Find the Taylor polynomial of degree 5 near x = 1 for the following function: \(y=\sqrt{4x-3}\)
f = function(x) sqrt(4*x - 3)
# Vector of length n+1 represents a polynomial degree n
#taylor(f,x0, n=4)
pracma::taylor(f, 1, n = 4)
## [1] -10.00254 44.01025 -74.01549 58.01040 -17.00262