TRENDING NEWS

POPULAR NEWS

Consider The Following Functions. I Need To Understand This.

Consider the following: f(t)=t+cos(t) on the interval -2pi less than or equal to t less than or equal to 2pi?

f(t)=t+cos(t)
f' = 1 - sin t
0 = 1 - sin t
t = -3π/2, π/2 are critical #s
Intervals are :
(-2π,-3π/2) ; (-3π/2, π/2) ; ( π/2, 2π)
f'(-2π)>0 ; f'(0)>0 ; f'(2π) > 0
The function increases in all intervals.
There is no change of increases, there is no local extremum.

f" = -cos t
0 = -cos t
t = -3π/2, -π/2 , π/2 , -3π/2
These are points f inflection.

Use f" = -cos t to test each interval:
f"(-2π)<0 concave down [-2π,-3π/2]
f"(-π) >0 concave up [-3π/2, -π/2 ]
f"(0) < 0 concave down [ -π/2 , π/2 ]
f"(π)>0 concave up [ -π/2 , 3π/2]
f"(2π)<0 concave down [ -π/2 ,2π]

Consider the following function. f(x) = 1 +(7/x)-(2/x^2)?

There's a lot of stuff here, but I think I've figured it all out.

First, we can write this function two ways:

ƒ(x) = 1 + 7/x - 2/x^2 = (x^2 + 7x - 2) / x^2

The first and second derivatives are:

ƒ '(x) = -7/x^2 + 4/x^3 and ƒ "(x) = 14/x^3 - 12/x^4

• There's a vertical asymptote on the y-axis (where x = 0). (Answer a) ƒ(0) = -2/0 (undefined)

• There's a horizontal asymptote at y = 1 (Answer a). For very large x (positive or negative), ƒ(x) approaches x^2 / x^2 = 1. For large positive x, ƒ(x) > 1, and for large negative x, ƒ(x) < 1.

• ƒ '(x) = -7/x^2 + 4/x^3 = 0 ==> x = 4/7 is a critical point. ƒ(4/7) = 57/8 > 1. From that, we know the shape of the curve, as follows:

• Negative slope (decreasing function) for x < 0, approaching asymptotes on the left (y=1 from below) and right (to negative infinity at x=0)

• Positive slope for 0 < x < 4/7 with asymptote (-∞) on the left and maximum (57/8) on the right

• Negative slope for x > 4/7 with maximum on the left and horizontal asymptote (y=1) on the right.

• Second derivative ƒ "(x) = 14/x^3 - 12/x^4 = 0 ==> x = 6/7 is inflection point. (You evaluate ƒ(6/7).) Therefore, the function is concave up for x > 6/7 and concave down for x < 6/7, with infinite discontinuity at x = 0.

These are all your answers. (But you have to evaluate ƒ(6/7) to complete the inflection point.)

What are the domain and range for the following functions. 1.f(x)=(x-3)/(x+4) 2.f(x)=(3x^2+3x-6)/(x^2-x-12)?

I am still confused on how to the find the domain and range of rational functions. If someone could help me and also give me an explanation on how to do this that would be great. Any help would be appreciated. Please I need this for an upcoming test urgently!

What is the tail recursion function?

Consider the following function:def f(n):
if n == 0:
return 0
else:
r = f(n-1)
return r + n
When you run this with input 10, the computer will go through the following process:We’ll need to calculate f(9), and then add 10 to that.We’ll need to calculate f(8), and then add 9 to that. And then, add 10 to that.We’ll need to calculate f(7), and then add 8 to that. And then, add 9 to that. And then, add 10 to that.and so on. A lot of stuff is kept on the stack, essentially a long list of “and then, do such and such”. This is pretty terrible.Now consider the following:def g(n, accumulator=0):
if n == 0:
return accumulator
else:
return g(n-1,accumulator+n)
Now the process becomes:We’ll need to calculate g(9,10).We’ll need to calculate g(8,19).We’ll need to calculate g(7,27).We’ll need to calculate g(6,33).and so on. At each time step, there is only 1 task to do on the stack. This is a tail-recursive function: the recursive call is the last thing in the function definition. Many compilers and interpreters have ways of optimizing such code to avoid using more memory than necessary.

What are the most counterintuitive concepts in functional programming?

In pure functional programming, there aren’t really any, except when you have lazy evaluation, such as in Haskell.In Haskell, expressions are not evaluated until their values are needed (unless the compiler can determine that the values will be needed, in which case expression will be evaluated immediately). Instead of calculating a value, Haskell builds a thunk which is a combination of an expression and a pointer to the context in which the expression should be evaluated. When the value is needed, the expression will be evaluated in this context, and the thunk replaced with the resulting value.Consider the following function:product [] accumulator = accumulator
product (0 : xs) accumulator = 0
product (x : xs) accumulator = product xs (x*accumulator)
Intuitively, this should use constant space (not counting the input list), but it will in fact use space linear in the length of the input list. The reason is that the accumulator is not always used (because it is discarded if the list contains a 0). So instead of evaluating (x*accumulator), a thunk is built. This think will contain a reference to the previous thunk, and so on, effectively creating a linked list of thunks. In ML, F#, or other non-lazy functional languages, the expression will be evaluated immediately, so only constant space is used. The space behaviour of lazy evaluation can be a bit difficult to predict, where it is fairly easy to do so if strict (non-lazy) evaluation is used.Note that it is only the resource use that may be a bit counterintuitive. The result of calling the function will be exactly what you would expect it to be. Except, that is. if the list contains elements that would give run-time errors. Callingproduct [0, 1 `div` 0] 1
will, in Haskell, give the result 0 instead of reporting division by zero. This is because 1 `div` 0 is never evaluated, since it is not required to find the result.

Does this function have an inverse on the given domain?

solve for x

x^2 = -3f(x) - 3

x = +/- sqrt(-3f(x) -3)
now switch x with g(x) and f(x) with x, where g(x) is inverse function

g(x) = +/- sqrt(-3x -3)

for the domain x<-7 notice that the square root will NOT contain a negative number when you plug in values of x less than -7

for example, x = -10
sqrt(-3x -3) = sqrt(30 -3) = sqrt(27) which is real.

It would not be defined for x > -7 because then the square root would contain a negative number, which involves complex numbers

Therefore the inverse is well-defined on the given domain.

Does a C function always need to return a value?

c function only has to return a value if the return type of the function in non void i.e if the return type is int,float,double etc. but if the return type is void then the function cannot return anything.another importent point to note here is that a non void function can always return ONLY ONE value,a function cannot return multiple values.examplereturn a; //validreturn a,b; //invalid

TRENDING NEWS