Re: real world solutions for a fractional permutation
- To: mathgroup at smc.vnet.net
- Subject: [mg77033] Re: real world solutions for a fractional permutation
- From: dimitris <dimmechan at yahoo.com>
- Date: Fri, 1 Jun 2007 02:41:44 -0400 (EDT)
- References: <f3lud3$6nq$1@smc.vnet.net>
Solve is not intended for this kind of solution. For equations like these one should consult FindRoot. Here is a nice way to use FindRoot. f[x_] := Gamma[5 + x] - 40 g[x_] := (4 + x)! - 40 In[107]:= plot = Plot[f[x], {x, 0, 1}] Print[StyleForm["the points used by the Plot function", FontColor -> Blue]]; Short[points = Cases[plot, {(x_)?NumberQ, (y_)?NumberQ}, Infinity], 2] Print[StyleForm["find where the function changes sign", FontColor -> Blue]]; seeds = Position[Apply[Times, Partition[points[[All,2]], 2, 1], {1}], x_ /; x <= 0] Print[StyleForm["between this points in x axis there is a change in sign of f[x]", FontColor -> Blue]]; samples = Extract[Partition[points[[All,1]], 2, 1], seeds] Print[StyleForm["the root(s), at last!", FontColor -> Blue]]; (FindRoot[Gamma[5 + x] - 40, {x, #1[[1]], #1[[2]]}, WorkingPrecision - > 40, PrecisionGoal -> 30] & ) /@ samples plot = Plot[g[x], {x, 0, 1}] Print[StyleForm["the points used by the Plot function", FontColor -> Blue]]; Short[points = Cases[plot, {(x_)?NumberQ, (y_)?NumberQ}, Infinity], 2] Print[StyleForm["find where the function changes sign", FontColor -> Blue]]; seeds = Position[Apply[Times, Partition[points[[All, 2]], 2, 1], {1}], x_ /; x 0] Print[StyleForm["between this points in x axis there is a change in sign of f[x]", FontColor -> Blue]]; samples = Extract[Partition[points[[All, 1]], 2, 1], seeds] Print[StyleForm["the root(s), at last!", FontColor -> Blue]]; (FindRoot[Gamma[5 + x] - 40, {x, #1[[1]], #1[[2]]}, WorkingPrecision - > 40, PrecisionGoal -> 30] &) /@ samples BTW, In[123]:= FunctionExpand[Gamma[5 + q]-40 == (4 + q)!-40] Out[123]= True / Roger Bagula : > This type of solution comes up in algebra theory for symmetric type groups: > Solve[(4+q)!-40==0,q] > Solve[Gamma[5+q]-40==0,q] > The Mathematica output refuses to give a number. > I worked at it a little. > Factorial: > (4+q)!=40 > gives: > 0.331291631797621 > Gamma[5+q]=40 > 0.3312924244499 > They stop agreeing at the 6th place in Mathematica. > I don't have a good program for either of them and essentually did them > by hand > one digit at a time. > > Something is wrong with how I'm calculating them for sure.