KonkurStudy
همه کارت‌ها

Matching Pieces of a Piecewise Function for CnC^n Smoothness

To glue two formulas at a breakpoint so the result is n-times continuously differentiable, force the two pieces to agree in value and in every derivative up to order n at that point — that single requirement chains all the lower orders along with it.

کارت مفهوم کنکور ارشد علوم کامپیوتر

اهمیت
۰/۵

A piecewise function

g(x)={L(x),x≤a,R(x),x>a,g(x) = \begin{cases} L(x), & x \le a, \\ R(x), & x > a, \end{cases}

is built from two smooth formulas LL and RR that meet at the breakpoint x=ax = a. Away from aa each piece is as smooth as you like, so the only place smoothness can fail is at the seam. The question is always: how many matching conditions at aa make gg belong to CnC^{n} (i.e. have a continuous nn-th derivative)?

The matching principle

g∈Cng \in C^{n} at x=ax = a   ⟺  \iff the two pieces agree at aa in value and in every derivative up to order nn: L(k)(a)=R(k)(a)for k=0,1,2,…,n.L^{(k)}(a) = R^{(k)}(a) \quad\text{for } k = 0, 1, 2, \dots, n.

That is n+1n+1 equations (orders 00 through nn). The logic chains downward: a continuous g(n)g^{(n)} forces g(n−1),…,g′g^{(n-1)}, \dots, g' and gg to be continuous too, because a function with a derivative is automatically continuous. So you never check continuity of the lower derivatives separately — matching the top order plus all the ones beneath it is exactly the full list.

Intuitively, at a breakpoint each piece supplies a one-sided value L(k)(a−)L^{(k)}(a^{-}) from the left and R(k)(a+)R^{(k)}(a^{+}) from the right. The derivative g(k)g^{(k)} exists and is continuous at aa only when these one-sided values coincide for that order and all lower ones.

How to apply it

  1. Identify the breakpoint aa and the two pieces LL (used for x≤ax \le a) and RR (used for x>ax > a).
  2. Decide the target order nn: "continuous" is C0C^{0} (match k=0k=0); "differentiable" / "continuous first derivative" is C1C^{1} (match k=0,1k=0,1); "continuous second derivative" is C2C^{2} (match k=0,1,2k=0,1,2); and so on.
  3. Differentiate each piece up to order nn and evaluate at aa. Watch the product, chain, and quotient rules — most slips happen here.
  4. Set L(k)(a)=R(k)(a)L^{(k)}(a) = R^{(k)}(a) for k=0,…,nk = 0, \dots, n, giving n+1n+1 equations, then solve for the unknown constants.

Worked mini-example

Choose bb and cc so that

g(x)={sin⁡x,x≤0,bx+c,x>0,g(x) = \begin{cases} \sin x, & x \le 0, \\ b x + c, & x > 0, \end{cases}

is C1C^{1} (continuously differentiable). Here n=1n = 1, so we match orders k=0k = 0 and k=1k = 1 at a=0a = 0.

Left piece L(x)=sin⁡xL(x) = \sin x:   L(0)=0,  L′(x)=cos⁡x,  L′(0)=1.\;L(0) = 0,\; L'(x) = \cos x,\; L'(0) = 1.

Right piece R(x)=bx+cR(x) = b x + c:   R(0)=c,  R′(x)=b,  R′(0)=b.\;R(0) = c,\; R'(x) = b,\; R'(0) = b.

Matching:

Order kk Equation Result
00 (value) L(0)=R(0)L(0) = R(0) 0=c⇒c=00 = c \Rightarrow c = 0
11 (slope) L′(0)=R′(0)L'(0) = R'(0) 1=b⇒b=11 = b \Rightarrow b = 1

So gg is C1C^{1} exactly when b=1, c=0b = 1,\, c = 0, i.e. the right piece is the tangent line y=xy = x. (For a C2C^{2} glue we would additionally need R′′(0)=L′′(0)R''(0) = L''(0), i.e. 0=−sin⁡0=00 = -\sin 0 = 0, which already holds — but a generic quadratic right piece would pin a third condition.)

This is the same machinery the konkur problem uses: there the left piece is f(x)exf(x)e^{x} and the right is 3x2−4x+73x^{2}-4x+7, and demanding a continuous second derivative (C2C^{2}) gives the three equations L(0)=7, L′(0)=−4, L′′(0)=6L(0)=7,\ L'(0)=-4,\ L''(0)=6 from the product rule.

Exam trick: Translate the wording into a number first — "g∈Cng \in C^{n}" means "match orders 00 through nn," giving n+1n+1 equations, no more, no less. The biggest trap is matching only the top order (e.g. just g′′g'') and forgetting that you still need the value and first-derivative equations; conversely, do not waste time re-checking continuity of gg once you have matched a higher derivative, since that comes for free.

فرمول‌های کلیدی

$C^n$ matching conditions at a breakpoint
L(k)(a)=R(k)(a),k=0,1,…,nL^{(k)}(a) = R^{(k)}(a), \quad k = 0, 1, \dots, n

The n+1 equations that make a two-piece function n-times continuously differentiable at the seam x=a.

Smoothness ladder (wording -> order)
C0: k=0;C1: k=0,1;C2: k=0,1,2C^{0}:\ k{=}0;\quad C^{1}:\ k{=}0,1;\quad C^{2}:\ k{=}0,1,2

Continuous = match values; continuously differentiable = also match slopes; continuous second derivative = also match second derivatives.

#piecewise-function#smoothness#continuity#differentiability#C-n#matching-conditions#one-sided-derivatives#product-rule

سوالات تمرینی