Re: DSolving(?) for a given tangent

*To*: mathgroup at smc.vnet.net*Subject*: [mg81398] Re: DSolving(?) for a given tangent*From*: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>*Date*: Sat, 22 Sep 2007 03:22:08 -0400 (EDT)*Organization*: The Open University, Milton Keynes, UK*References*: <fct9c4$r6e$1@smc.vnet.net> <fcvrjh$7ur$1@smc.vnet.net>

Jean-Marc Gulliet wrote: > AngleWyrm wrote: > >> Don't know for sure if this is the right function, so here's the scenario: >> >> f[x_] := E^(0.22 x); >> Plot[f[x], {x, 6, 36}] >> >> Which plots a nice escalating curve. >> >> What I would like to know is: Where is the point {x,f[x]} that has a >> 45-degree tangent line; ie where is this curve's balance point before it >> really starts taking off? > > So what you are looking for is the value of x for which f'[x] == Pi/4 Sorry about this non-sense! Obviously, answering too many threads simultaneously burnt some of my neurons and nothing surprise me when I wrote this "answer". The right thing we are looking for is f'[x] == 1. > (i.e. the slope of the tangent at x is 45 degrees but it must be > expressed in radians rather than in degrees). The solution can be found > by solving the equation f'[x] == Pi/4 for x; to do so one can use Solve > or Reduce for an analytic solution (which implies exact coefficients > such as 22/100 rather than 0.22) or NSolve or FindRoot for an numerical > solution. For instance, > > In[1]:= > f[x_] := E^(0.22 x); > Plot[f[x], {x, 6, 36}] > sol = NSolve[f'[x] == Pi/4, x] > x /. sol[[1]] > > Out[3]= {{x -> 5.78438}} > > Out[4]= 5.78438 The following fixed code yields the correct result. In[1]:= f[x_] := E^(0.22 x); Plot[f[x], {x, 6, 36}] sol = NSolve[f'[x] == 1, x] x /. sol[[1]] FindRoot[f'[x] == 1, {x, 6}] Out[3]= {{x -> 6.8824}} Out[4]= 6.8824 Out[5]= {x -> 6.8824} Again, sorry for the confusion. Regards, -- Jean-Marc