Limits pre- & post-Solve[]

• To: mathgroup at smc.vnet.net
• Subject: [mg14486] Limits pre- & post-Solve[]
• From: "Richard W. Klopp" <rwklopp at unix.sri.com>
• Date: Fri, 23 Oct 1998 20:59:06 -0400
• Organization: SRI International
• Sender: owner-wri-mathgroup at wolfram.com

```I've run into difficulties while solving a practical problem. I can
illustrate with a simpler example. Consider two linear functions
f[x]:=m x + b, and g[x]:= n x + c. The question that I want to answer
is how far from the origin do I have to integrate each function so that
their definite integrals are equal. I ask for the answer as left and
right offset h from some target ordinate t, as shown below. Visualize
it as equating the areas under two straight lines bounded on the left
by the origin.

In[154]:=

Solve[Integrate[m x + b,{x,0,t+h}]==Integrate[n x + c,{x,0,t-h}],h]

Out[154]=

{{h -> (-b - c - m*t - n*t -
Sqrt[b^2 + 2*c*b + 4*n*t*b + c^2 + 4*m*n*t^2 + 4*c*m*t])/
(m - n)}, {h ->
(-b - c - m*t - n*t + Sqrt[b^2 + 2*c*b + 4*n*t*b + c^2 +
4*m*n*t^2 + 4*c*m*t])/(m - n)}}

I think that you can anticipate the problem if the slopes of the lines,
m and n are the same:

In[155]:=

Solve[Integrate[m x + b,{x,0,t+h}]==Integrate[n x +
c,{x,0,t-h}],h]/.n->m

\!\(Power::"infy" \( : \ \) "Infinite expression \!\(1\/0\)
encountered."\)
\!\(Power::"infy" \( : \ \) "Infinite expression \!\(1\/0\)
encountered."\)

Out[155]=

{{h -> ComplexInfinity}, {h -> ComplexInfinity}}

Taking the limit as one slope approaches the other m->n doesn't help.

In[157]:=

Limit[h/.Solve[Integrate[m x + b,{x,0,t+h}]==Integrate[n x +
c,{x,0,t-h}],h],
n->m]

Out[157]=

{DirectedInfinity[b + c + 2*m*t +
Sqrt[b^2 + 2*c*b + 4*m*t*b + c^2 + 4*m^2*t^2 + 4*c*m*t]],
DirectedInfinity[b + c + 2*m*t -
Sqrt[b^2 + 2*c*b + 4*m*t*b + c^2 + 4*m^2*t^2 + 4*c*m*t]]}

However, if I makes the slopes equal before I Solve[], everything's
fine.

In[158]:=
h/.Solve[((Integrate[m x + b,{x,0,t+h}]-Integrate[n x +
c,{x,0,t-h}])/.n->m)==
0,h]

Out[158]=

{((-b + c)*t)/(b + c + 2*m*t)}

What's going on and how do I get In[154] to behave as I desire, that is,
come out with something like Out[158]?

```

• Prev by Date: Re: ImplicitPlot options (undocumented)
• Next by Date: Re: Printing Problems under Windows98
• Previous by thread: Re: Use of the command Display, with ImageResolution
• Next by thread: Re: Limits pre- & post-Solve[]