MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: New to Mathematica

  • To: mathgroup at
  • Subject: [mg126405] Re: New to Mathematica
  • From: Bill Rowe <readnews at>
  • Date: Tue, 8 May 2012 04:09:18 -0400 (EDT)
  • Delivered-to:

On 5/6/12 at 8:28 PM, jack.j.jepper at (J.Jack.J.) wrote:

>Thanks for replying. Responses embedded:

>On May 6, 8:24 am, Murray Eisenberg <mur... at> wrote:
>>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?

>I tried and tried for hours but couldn't so much as find any section
>that would even tell me how to write the condition that k be an

The specifics of how to specify k is an integer depends on
exactly what function you will be using. For several functions
such as Integrate, you can use Assuming to specify assumptions
about variables. For example, compare:

In[12]:= Assuming[{m, n} \[Element] Integers && m != n,
  Integrate[Cos[n x] Cos[m x], {x, \[Pi], 0}]]

Out[12]= 0

with the result obtained with no assumptions about m,n

In[13]:= Integrate[Cos[n x] Cos[m x], {x, \[Pi], 0}]

Out[13]= (n cos(\[Pi] m) sin(\[Pi] n)-m sin(\[Pi] m) cos(\[Pi] n))/(m^2-n^2)

In other cases such as for NMinimize or NMaximize, conditions
for variables are specified as part of the syntax. Details can
be found in the documentation.

But, specifying k is an integer in your particular case really
isn't useful.

>For example, proper syntax for the equation would be:

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

>>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.

This is a key point. Typically, transcendental equations do not
have closed form symbolic solutions and are only solved
numerically. In general, when there is a closed form symbolic
solution, it is because the equation occurs often enough in some
field someone created a special function to represent the solution.

So, assuming the only possible solution is a numerical solution
you will have to substitute specific values for k to get a
solution such as was done with:

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

  • Prev by Date: Re: New to Mathematica
  • Next by Date: Re: New to Mathematica
  • Previous by thread: Re: New to Mathematica
  • Next by thread: Re: New to Mathematica