Let the functions $f$, $g$ and $h$ be given, compute $(f \circ g \circ h)(4)$

71 Views Asked by At

I will appreciate so much someone helping me to verify this exercise.

Let the functions $f$, $g$ and $h$ be given by:

  • $f(x)=\begin{cases} \dfrac{3+x}{x^2+1},&x\in~]-\infty, -2[\\ 15+2x-x^2,&x\in[2,-2[\\ x^3-64,&x\in[2,+\infty[ \end{cases}$
  • $g(x)=\sqrt{4+x}$
  • $h(x)=\frac{1}{x^2-1}$

Compute $(f \circ g \circ h)(4)$.

\begin{align} (f \circ g \circ h)(4) &= f\Big(g\big(h(4)\big)\Big) \\ &= f\left(g\left(\frac{1}{4^2-1}\right)\right) \\ &= f\left(g\left(\frac{1}{15}\right)\right) \\ &= f\left(\sqrt{4+\frac{1}{15}}\right) \\ &= f\left(\sqrt{\frac{61}{15}}\right). \end{align}

Given that $\sqrt{\frac{61}{15}} \approx 2.02$, then

\begin{align} f\left(\sqrt{\frac{61}{15}}\right) &= \left(\sqrt{\frac{61}{15}}\right)^3-64 \\ &= \frac{61\sqrt{61}}{15\sqrt{15}}-64. \end{align}

Thanks for your time.

1

There are 1 best solutions below

0
On

Yes, it is correct.

To avoid using a calculator, $$\sqrt{\frac{61}{15}} > \sqrt{\frac{60}{15}}=2.$$

Python code for verification.

import math

def f(x):
    if x < -2:
        return (3+x)/(x**2+1)
    elif x < 2:
        return 15+2*x-x**2
    else:
        return x**3-64
    
def g(x):
    return math.sqrt(4+x)

def h(x):
    return 1/(x**2-1)


print(f(g(h(4))))


print(61*math.sqrt(61)/(15*math.sqrt(15)) - 64) 

print(abs(f(g(h(4))) - (61*math.sqrt(61)/(15*math.sqrt(15)) - 64))<1e-99)

gives

-55.79916896713329
-55.79916896713329
True