How to merge two (or more) continuous functions into one?

518 Views Asked by At

I have two functions,

$g(x) = 4x^3$, domain $0<x<0.5$

$h(x) = \frac{1}{2}((2x-1)^3+1)$, domain $0.5\le x<1$

which I derived from:

$g(x) = ((2x)^3)/2$, domain $0<x<0.5$

$h(x) = ((2(x-0.5))^3)/2+0.5$, domain $0.5\le x<1$

I want to combine g(x) and h(x) info one function, f(x). If it helps, h(x) is derived from g(x). Here is a graph of g(x) and h(x). h(x) is g(x), [reflected] or [rotated $\pi$ radians] about $(0.5, 0.5)$.

I have looked at other questions related, such as this, but I wasn't sure how to apply the solution to this scenario because my functions didn't have two parameter. How can I combine these two into one function f?

$f(x)=?$

1

There are 1 best solutions below

1
On

Hint :

Both are cubic functions:

One thing you may try is $$f(x) = Ag(x) + Bh(x)$$

Evaluate f(x) in those interval ends and get the value of A and B. I have not tried but should work.