# Calculus: Continuity problem.

**URL:** <https://community.wolfram.com/t/calculus-continuity-problem/3324>\
**Category:** Questions\
**Tags:** mathematica, wolfram-alpha, calculus\
**Created:** [September 16, 2014, 2:25pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324 "2014-09-16T14:25:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![janetgordon1981](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/janetgordon1981/32/39240_2.png) [@janetgordon1981](https://community.wolfram.com/u/janetgordon1981)\
**Post date:** [September 16, 2014, 2:25pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324/1 "2014-09-16T14:25:38Z")

</div>

Find the values of a and b that make the given function continuous.

```
f(x)={a(tan^-1 x +2), if x<0, 
        2e^bx +1, if 0<(or equal to) x <(or equal to) 3, 
        ln(x-2) +x^2, if x>3

```

I cannot get WolframAlpha to understand this question and everyone I have asked for help also has not been able to figure it out, does anyone here know how to solve this or know how to make Wolfram understand it? Hopefully I worded this appropriately to actually get help this time. Thanks!

---

<div class="post-metadata">

**Author:** ![isaacabraham](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/isaacabraham/32/24597_2.png) [@isaacabraham](https://community.wolfram.com/u/isaacabraham)\
**Post date:** [September 16, 2014, 8:46pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324/2 "2014-09-16T20:46:26Z")

</div>

I’m attempting to answer for the “Mathematica” listed above.

```
f[a_, x_] := a (ArcTan[x] + 2);(*x<0*)
g[b_, x_] := 2 Exp[b x] + 1; (*0<=x<=3*)
h[x_] := Log[x - 2] + x^2; (*x>3*)

solb = b /. Solve[Limit[g[b, x], x -> 3] == h[3], b][[1]] 
sola = a /. Solve[Limit[ f[a, x], x -> 0] == g[b, 0], a][[1]]

```

Unfortunately the values I get namely `a=Log[4]/3=0.46` and `b=3/2` do not result in the three pieces having the same slope at the “joins”. Enforcing the same slope at the two joins gave `a=1.18` and `b=0.59`. Therefore I don’t think there is a solution. Maybe someone else will post a better solution.

---

<div class="post-metadata">

**Author:** ![danl](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/danl/32/41267_2.png) [@danl](https://community.wolfram.com/u/danl)\
**Post date:** [September 16, 2014, 9:54pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324/3 "2014-09-16T21:54:06Z")

</div>

Use input that forces compatibility at the two junctures. In other places these functions are continuous.

```
solve a*(atan(0)+2)=3, 2*e^(3b)+1=9 for a, b

```

[http://www.current.wolframalpha.com/input/?i=solve+a\*(atan(0)%2B2)%3D3%2C+2\*e^(3b)%2B1%3D9+for+a%2C+b](http://www.current.wolframalpha.com/input/?i=solve+a*%28atan%280%29%2B2%29%3D3%2C+2*e%5E%283b%29%2B1%3D9+for+a%2C+b)

In Mathematica this could be done in any of several ways. Here is one such.

```
Solve[{a*(ArcTan[0] + 2) == 2*E^b + 1, 2*E^(3*b) + 1 == Log[1] + 3^2}, {a, b}, Reals]

```

This is more elaborate but allows one more flexibility in handling.

```
f1[a_, b_, x_] := a*(ArcTan[x] + 2)
f2[a_, b_, x_] := 2*Exp[b*x] + 1
f3[a_, b_, x_] := Log[x - 2] + x^2
Solve[{f1[a, b, 0] == f2[a, b, 0], 
  f2[a, b, 3] == f3[a, b, 3]}, {a, b}, Reals]

(* Out[14]= {{a -> 3/2, b -> (2 Log[2])/3}} *)

```

---

<div class="post-metadata">

**Author:** ![janetgordon1981](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/janetgordon1981/32/39240_2.png) [@janetgordon1981](https://community.wolfram.com/u/janetgordon1981)\
**Post date:** [September 16, 2014, 10:07pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324/4 "2014-09-16T22:07:31Z")

</div>

Thank you for the input.

---

<div class="post-metadata">

**Author:** ![janetgordon1981](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/janetgordon1981/32/39240_2.png) [@janetgordon1981](https://community.wolfram.com/u/janetgordon1981)\
**Post date:** [September 16, 2014, 10:14pm UTC](https://community.wolfram.com/t/calculus-continuity-problem/3324/5 "2014-09-16T22:14:06Z")

</div>

Thank you for the help!
