Tag Info

New answers tagged

4

I realize you should probably show your attempts at the problem first, but I had fun doing this problem so I'd figure I'd share my solutions. I have 4 solutions, which I'll list slowest to fastest. Using InverseFunction Plot[InverseFunction[Coth[#] - 1/# &][y], {y, 0., 1.}] // AbsoluteTiming Using FindRoot I wanted to try faster methods, so next ...


0

Obtaining inverse functions numerical is a standard Mathematica process using FindRoot. The expression you want is inv[y_] := z /. FindRoot[Coth[z] - 1/z - y, {z, .5}] For completeness, a plot of the function is given below.


1

There is no single method to get the inverse of a matrix, but if you only want to know how to get the inverse for arbitrary values of the matrix, ask MMA to solve it symbolically and use the resulting expression! mat = {{a, b}, {c, d}} Inverse@mat (* {{d/(-b c + a d), -(b/(-b c + a d))}, {-(c/(-b c + a d)), a/(-b c + a d)}} *)


0

Using some intermediate steps. m = {{8, 2}, {3, 2}}; Quiet@Needs["Combinatorica`"] adjoint = Transpose[Array[Cofactor[m, {#1, #2}] &, Dimensions[m]]]; determinant = Det[m]; inverse = adjoint/determinant


2

A bit of an aside, but a little variable substitution helps that integral quite a lot.. f[x_?NumberQ] := y /. FindRoot[LogIntegral[y] == x, {y, x*Log[x]}, WorkingPrecision -> 20, PrecisionGoal -> 12] Log[10] NIntegrate[(10^n/f[10^n])^2 , {n, 7, 200}, MinRecursion -> 5, MaxRecursion -> 20] 0.0519674 (~10x faster ...


5

This seems usable at least for moderately large x. one could use cutoffs and different start values if this is not useful in smaller ranges. f[x_?NumberQ] := y /. FindRoot[LogIntegral[y] == x, {y, x*Log[x]}, WorkingPrecision -> 20, PrecisionGoal -> 12] Two examples: f[10^200] (* Out[55]= 4.6565831394119416907*10^202 *) NIntegrate[n/(f[n])^2, ...


1

There are a number of errors in your code, so hopefully going through them one by one will help you in your task. First, I'll define numbers to insert into the matrices: h[k_, l_] := k Sin[l]; g[i_, k_, l_] := 10/(1 + i^2 + k^2 + l^2) + RandomReal[]; f[i_, l_] := i l; x[l_] := 1; M = 10; n = 4; The first line of code, H = Table[H[k, l], {k, 2 M}, {l, 2 ...



Top 50 recent answers are included