Re: request help
- To: mathgroup at smc.vnet.net
- Subject: [mg116202] Re: request help
- From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
- Date: Sat, 5 Feb 2011 05:43:54 -0500 (EST)
- References: <iig76m$rl2$1@smc.vnet.net>
Well, I don't have an analytic approach. I just note that the plot of
the function seems smooth enough that it can be easily fitted, for
instance by the product of n and a polynome in r of order 4, as long
as you stay out of the forbidden areas of this plot:
ContourPlot[dis[r, n], {r, -1, 1}, {n, -1, 6}]
So, here some fit examples:
DynamicModule[{f, b, c},
f[r_, n_] := n (b r^2 + c r^4);
Manipulate[
{b, c} = {b1, c1} /.
FindFit[Table[{r, dis[r, n]}, {r, -0.2, 0.2, .01}],
n b1 x^2 + n c1 x^4, {b1, c1}, x];
Show[
Plot[f[r, n], {r, -.2, .2}, PlotStyle -> Directive[Red, Dashed],
PlotRange -> All],
Plot[dis[r, n], {r, -.2, .2}, PlotRange -> All,
PlotStyle -> Directive[Blue, DotDashed]]
, ImageSize -> 500, Frame -> True],
{n, 1, 5}, TrackedSymbols -> {n}
]
]
Given the fit, the road to the inverted function is now easy and left
as an exercise to the reader.
Cheers -- Sjoerd
On Feb 4, 7:43 am, Berihu Teklu <beri... at gmail.com> wrote:
> I need to invert a real function of two real variables Dis[r, n] with
> respect to the first variable r, while the second variable n is fixed.
> The function is rather difficult, that I couldn't invert it. this is
> kindly request you to write me any comments on the attached notebook.
>
> Many thanks for any help,
>
> Berihu
>
> Dis[r_, n_] :=
> 1/4 (2 (-2 + Sqrt[(1 + 2 n)^2]) Log[-2 + Sqrt[(1 + 2 n)^2]] -
> 2 (2 + Sqrt[(1 + 2 n)^2]) Log[
> 2 + Sqrt[(1 + 2 n)^2]] - (-2 +
> Sqrt[(1 + 2 n)^2 Cosh[2 r]^2]) Log[-2 +
> Sqrt[(1 + 2 n)^2 Cosh[2 r]^2]] + (2 +
> Sqrt[(1 + 2 n)^2 Cosh[2 r]^2]) Log[
> 2 + Sqrt[(1 + 2 n)^2 Cos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