Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9970

Re: New to Mathematica

From Murray Eisenberg <murray@math.umass.edu>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: New to Mathematica
Date 2012-05-06 07:24 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jo58um$2b8$1@smc.vnet.net> (permalink)
References <jntga4$2c$1@smc.vnet.net> <201205050814.EAA22939@smc.vnet.net>

Show all headers | View raw


First, perhaps folks were reluctant to respond because this looked like 
it could be a homework exercise.

Second, you don't even have proper Mathematica syntax in your equation 
relating x and k. Did you even try to read the documentation to learn 
the very basics? For example, proper syntax for the equation would be:

   (x/Log[x]) (1 + 1/Log[x]) == 108.2 + k

Function arguments must be enclosed in brackets, not parentheses, and 
the equality is a doubled "=" sign. Moreover, your original expression 
had an unbalanced terminal parenthesis.

Third, the equation itself looks really nasty. Aside from the fact that 
it mixes exact formulas with an approximate real (108.2), the left-hand 
side is transcendental.

Fourth, the equation does not seem to uniquely define x as a function of 
k! For example, form the difference between the two sides...

   f[x_] := (x/Log[x]) (1 + 1/Log[x]) - 108.2 - k

... and plot f for, say, k = 2:

   Plot[Evaluate[f[x] /. k -> 2], {x, 0.5, 2}, Exclusions -> {x == 1},
  AxesOrigin -> {0, 0}, PlotRange -> {-5, 5}]

The graph crosses the x-axis twice. And indeed, if you use FindRoot with 
initial guesses above and below 1, you'll see that this is so:

    FindRoot[Evaluate[f[x] /. k -> 2], {x, 0.9}]
{x -> 0.916554}

    FindRoot[Evaluate[f[x] /. k -> 2], {x, 1.1}]
{x -> 1.11137}



On 5/5/12 4:14 AM, J.Jack.J. wrote:
> On May 3, 9:40 am, "J.Jack.J."<jack.j.jep...@googlemail.com>  wrote:
>> Hi,
>>
>>   I have just downloaded my free trial version of Mathematica.
>>   I only need it for one thing (as yet, anyway), and I wonder whether
>> someone can help me in step-by-step fashion to get what I want. I need
>> the solution to the following (I might make amendments to the values):
>>
>> "For any integer k, let r(k) be x such that
>>
>> (x/ln(x))*(1 + 1/ln(x)) = 108.2 + k)
>>
>> product (k = 0 to 3000) (1-1/r(k))"
>>
>> With many thanks in advance.
>
> Can nobody help me with this? Just for a Newbie?
> As most will realise, the first lines define my function and the
> product (k = 0 to 3000) (1-1/r(k))
> is my desired calculation. I need to know what inputs to use.
>
> With thanks in advance.
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

New to Mathematica "J.Jack.J." <jack.j.jepper@googlemail.com> - 2012-05-03 08:40 +0000
  Re: New to Mathematica "J.Jack.J." <jack.j.jepper@googlemail.com> - 2012-05-05 08:16 +0000
    Re: New to Mathematica David Bailey <dave@removedbailey.co.uk> - 2012-05-06 07:25 +0000
      Re: New to Mathematica "J.Jack.J." <jack.j.jepper@googlemail.com> - 2012-05-07 00:30 +0000
    Re: New to Mathematica "Oleksandr Rasputinov" <oleksandr_rasputinov@ymail.com> - 2012-05-08 08:07 +0000
  Re: New to Mathematica Murray Eisenberg <murray@math.umass.edu> - 2012-05-06 07:24 +0000
    Re: New to Mathematica "J.Jack.J." <jack.j.jepper@googlemail.com> - 2012-05-07 00:30 +0000
  Re: New to Mathematica "J.Jack.J." <jack.j.jepper@googlemail.com> - 2012-05-08 08:09 +0000
  Re: New to Mathematica Bob Hanlon <hanlonr357@gmail.com> - 2012-05-08 08:15 +0000

csiph-web