I too have experienced Carl Woll's finding (referenced below) that
FunctionInterpolation[] does NOT adaptively sample the underlying
(exact) function in determining its sampling grid.
sets of InterpolationFunctions, each computed for a differing region
of the domain at appropriate (fixed) grid density. But of course,
this is a pain, and not at all a general solution. MathSource
apparently does not contain any adaptive FunctionInterpolation[]
package.
So this is a cry to WRI or anyone who may already have the goods to
come forward with this capability...it's really a good-to-have in
furthering Mathematica's appeal. I know one could craft it based
around ListInterpolation[], but I'm looking to save this effort (if
possible).
Frank J. Iannarilli
+++++++++++++
I am trying to use FunctionInterpolation to approximate a function
(given the default option InterpolationPoints -> 11 ...) In
investigating
the behavior of FunctionInterpolation, I discovered that it calculates
points on an 11x11 grid only. When I increase the number of
interpolation points, FunctionInterpolation calculates points on a
finer
grid. However, there is only one region of space where the answer is
poor, so I only want to increase the number of points used in the
region
where the answer is poor, not everywhere. How can I do this?
Since FunctionInterpolation has a MaxRecursion option, I figured that
FunctionInterpolation used an adaptive procedure to select points.
This
is apparently not so. Is this really true, or is there a way to force
FunctionInterpolation to select points adaptively. If not, what does
the
option MaxRecursion do?
--
Carl Woll
Dept of Physics
U of Washington
====
I have been working for some time with Mathematica, but I don't seem to find \
how can someone can start a new Mathematica session without exiting the
program. What I want is to be able to clear all of the variables and their
definitions at the same time and so be able to start a new session. In other \
programs that can be done (i.e. Clear All etc.). Can such a
thing be done with mathematica, or everytime you want to \clear the \
kernel\
from all its variable you must exit the program and start it over again?
I haven't been able to locate this kind of information anywhere (even the
Mathematica book) and so I would highly appreciate it if someone could help \
me. I should also note that I am using Mathematica v.4.
Thanx.
konstantinos Economou.
====
You can exit the kernel without exiting Mathematica by clicking on
\Quit Kernel\ under the drop-down menu under \Kernel \ on the tool bar, \
and
then clicking on \Local.\ You can then restart the kernel by clicking on
\Start Kernel\ on the same drop-down menu, and then clicking on \Local\
again.
Alternatively, if you only want to clear variables, you can \
evaluate
ClearAll[\*\].
Best,
Harvey
-----Original Message-----
I haven't been able to locate this kind of information anywhere (even the
Mathematica book) and so I would highly appreciate it if someone could help \
me. I should also note that I am using Mathematica v.4.
Thanx.
konstantinos Economou.
________________________________________________________________________
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
====
>
> I have been working for some time with Mathematica, but I don't seem to \
find
> how can someone can start a new Mathematica session without exiting the
> program. What I want is to be able to clear all of the variables and their \
> definitions at the same time and so be able to start a new session. In \
other
> programs that can be done (i.e. Clear All etc.). Can such a
> thing be done with mathematica, or everytime you want to \clear the \
kernel\
> from all its variable you must exit the program and start it over again?
You can use \Quit Kernel\ from the Kernel Menu.
Gruß Peter
--
=--=--=--=--=--=--=--=--=--=--=--=--=--= http://home.t-online.de/home/phbrf
Peter Breitfeld, Bad Saulgau, Germany Meinen GnuPG/PGP-5x Key gibts dort
====
Use Clear[\Global`*\];
====
Use Quit[] or Exit[].
Germán
----- Original Message -----
> programs that can be done (i.e. Clear All etc.). Can such a
> thing be done with mathematica, or everytime you want to \clear the
kernel\
> from all its variable you must exit the program and start it over again?
I haven't been able to locate this kind of information anywhere (even the
> Mathematica book) and so I would highly appreciate it if someone could
help
> me. I should also note that I am using Mathematica v.4.
Thanx.
konstantinos Economou.
>
====
Solve[{409 - 166*x + 17*x^2 - 218*y + 92*x*y - 10*x^2* y + 34*y^2 -
16*x*y^2 + 2*x^2* y^2 == 0, 23 - 5*x - 8*y + 2 == 0}, {x, y}]
does the job.
Have fun with MATHEMATICA; it is by far more enticing than any conceivable
(computer) game.
Matthias Bode
Sal. Oppenheim jr. & Cie. KGaA
Koenigsberger Strasse 29
D-60487 Frankfurt am Main
GERMANY
Tel.: +49(0)69 71 34 53 80
Mobile: +49(0)172 6 74 95 77
Fax: +49(0)69 71 34 95 380
E-mail: matthias.bode@oppenheim.de
Internet: http://www.oppenheim.de
-----Ursprungliche Nachricht-----
Von: royjmckee@aol.com [mailto:royjmckee@aol.com]
Gesendet: Donnerstag, 7. Marz 2002 08:24
An: mathgroup@smc.vnet.net
Betreff: New user with a problem, Can anyone help?
Currently doing a homework exercise and stuck on a question.
Question:
Find all values of x and y for which both
409 - 166x + 17x^2 - 218y + 92xy - 10x^2 y + 34y^2 - 16xy^2 + 2x^2 y^2
and
23 - 5x - 8y + 2
are equal to zero.
Hence find expressions a and b (involving x and y) such that these two
expressions are equal to a^2 + b^2 and a + b, respectively.
Can anyone help or give any hints as I am struggling to grasp this \
question?
====
Is anyone aware of any Mathematica code for Bayesian statistical analysis. \
In particular I am interested in implementations of Markov Chain Monte Carlo \
Methods (MCMC).
-Mark
====
> It might indeed be impractical to ask what I have said. But searching
> through the help in Mathematica I found no warnings that using
> Assumptions might fail in cases where an indeterminate form results.
> I don't think that it is too much to ask that the user be given an
> explanation that Simplify with Assumptions can fail for some cases
> (like the one I mentioned) and advising the user to check the results.
Perhaps it's not \using Assumptions\ that's failing to do what you want;
maybe it's something more basic. Your assumption (that n is an integer)
allows Mathematica to deduce that the numerator (Sin[n Pi]) must be 0.
Then, whether you or I like it or not, 0/n will yield 0 _without reference
to any assumption_. The \problem\ occurs only when n = 0. Being a \
\rare\
occurrence, it is ignored.
If you really want some things to ruffle your feathers, try the following:
Simplify[0/x, x==0]
Simplify[x/y, x==0 && y==0]
Simplify[x/x, x==0]
The results are 0, 0, and 1, resp., which I consider as being closer to
\crimes\ than \misdemeanors\.
> The one thing that I would respectfully disagree with is the
> comparison of 0/x and Sin[n Pi]/n. If I were applying
Simplify[ Sin[n Pi]/x, Element[n,Integers]]
and it returns zero, I could understand the claim that it correctly
> equals zero - Because I did not ask Simplify to put any conditions on
> x.
I must disagree. If you don't put any condition on the denominator,
then it certainly can be zero. And similarly, if you specify that the
denominator is an integer, then it certainly can be zero. No difference!
In a computer algebra system in which 0/0 is undefined, the _only_
time that simplifying 0/x to 0 is not a \misdemeanor\ IMO is when the
denominator is _known_ somehow (possibly by assumption) to be
_nonzero_.
David Cantrell
--
-------------------- http://NewsReader.Com/ --------------------
====
> If you really want some things to ruffle your feathers, try the \
following:
Simplify[0/x, x==0]
> Simplify[x/y, x==0 && y==0]
> Simplify[x/x, x==0]
The results are 0, 0, and 1, resp., which I consider as being closer to
> \crimes\ than \misdemeanors\.
It gets worse than that :-( Simplify doesn't agree with the rest of the
kernel:
In[1]:=
a = Simplify[0/x, x == 0];
b = Simplify[x/y, x == 0 && y == 0];
c = Simplify[x/x, x == 0];
Print[\0/x=\, a, \ x/y=\, b, \ x/x=\, c]
Out[1]:=
0/x=0 x/y=0 x/x=1
In[2]:=
(* will give errors without Off[Power::infy]; *)
(* and Off[\\[Infinity]::indet]; *)
x = 0; y = 0;
a = 0/x ;
b = x/y ;
c = x/x;
Print[\0/x=\, a, \ x/y=\, b, \ x/x=\, c]
Out[2]:=
0/x=Indeterminate x/y=Indeterminate x/x=Indeterminate
So 0/0 is assumed to be either 0, 1 or indeterminate depending on which
input form is used. Also, the second form gives warnings about the problem,
whereas the first doesn't.
Cheers,
--
Steve Durbin | Look! Minimalism comes to ASCII art!
| .
====
This matter has been discussed in the past a number of times so this
time I would just like concentrate on one aspect.
The Mathematica evaluator always gives
In[3]:=
{x/x,\dog\/\dog\}
Out[3]=
{1,1}
Therefore, since Simplify first evaluates its arguments, it never sees
x/x in Simplify[x/x, x==0] but only 1. Thus Simplify does not even get
a chance to consider the consequences of the assumption. This does not
depend on what sort of object x is at all. The practice of immediately
evaluating x/x to 1 is sensible for two reasons. One is simply a matter
of efficiency: immediate cancellation can greatly simplify and speed up
complex expressions and there are other ways of dealing with problems
like zero denominators etc. Leaving such expressions unsimplified or
returning conditional answers in the form If[x!=0,....] would result in
unnecessary extra complexity which in the great majority of cases is not
needed. In any case, computers are good in dealing with generic
situations while checking for special cases is best left to human
intelligence.
There is also another justification. In Mathematica a symbol like x
alone has no mathematical meaning. It is not necessarily a variable in
the sense of analysis. It can represent other objects, for example, an
element of a (multiplicative) abelian group or something called an
\indeterminate\, which is a formal variable that can have an inverse
x^-1 but does not \take values\. I such cases x* x^(-1) is indeed 1
unconditionally. If Mathematica returned something else it would make it
harder to implement this sort of structures. So it seem to me that there
is no doubt that the current practice is the right one. It is also, I
think, a good thing that Simplify evaluates its arguments. However, one
might take issue with the following:
In[4]:=
Simplify[Unevaluated[x/x],{x!=0}]
Out[4]=
1
Here Simplify did get a look at the expression x/x (rather than 1) but
it itself performed the cancellation before considering the assumption.
Maybe this might be considered a misdemeanor, but in my opinion a very
minor one, since the program is not intended to replace human
intelligence and mathematical knowledge but only to supplement it.
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
>> It might indeed be impractical to ask what I have said. But searching
>> through the help in Mathematica I found no warnings that using
>> Assumptions might fail in cases where an indeterminate form results.
>> I don't think that it is too much to ask that the user be given an
>> explanation that Simplify with Assumptions can fail for some cases
>> (like the one I mentioned) and advising the user to check the results.
Perhaps it's not \using Assumptions\ that's failing to do what you \
want;
> maybe it's something more basic. Your assumption (that n is an integer)
> allows Mathematica to deduce that the numerator (Sin[n Pi]) must be 0.
> Then, whether you or I like it or not, 0/n will yield 0 _without
> reference
> to any assumption_. The \problem\ occurs only when n = 0. Being a \
\rare\
> occurrence, it is ignored.
If you really want some things to ruffle your feathers, try the
> following:
Simplify[0/x, x==0]
> Simplify[x/y, x==0 && y==0]
> Simplify[x/x, x==0]
The results are 0, 0, and 1, resp., which I consider as being closer to
> \crimes\ than \misdemeanors\.
> The one thing that I would respectfully disagree with is the
>> comparison of 0/x and Sin[n Pi]/n. If I were applying
>> Simplify[ Sin[n Pi]/x, Element[n,Integers]]
>> and it returns zero, I could understand the claim that it correctly
>> equals zero - Because I did not ask Simplify to put any conditions on
>> x.
I must disagree. If you don't put any condition on the denominator,
> then it certainly can be zero. And similarly, if you specify that the
> denominator is an integer, then it certainly can be zero. No difference!
> In a computer algebra system in which 0/0 is undefined, the _only_
> time that simplifying 0/x to 0 is not a \misdemeanor\ IMO is when the
> denominator is _known_ somehow (possibly by assumption) to be
> _nonzero_.
David Cantrell
--
> -------------------- http://NewsReader.Com/ --------------------
>
====
My FindRoot usually fails in finding the root. The only thing that works is
if I change the starting values. I want to use the failed approximation \
that
results from a failed FindRoot expression and substitute this into one of
the starting values and then run FindRoot again. How can I automate this. \
Do
I use Catch and Throw ? If so how?
Mathematica Amateur
Leanne Ussher
====
if I combine several curves in one plot I need to put some text next to
the curves. To avoid that the horizontal text intersects several curves
I would like to rotate the text at specific different angles. I searched
possible?
Up to now I am using
pict1 = ListPlot[data1, PlotJoined -> True, PlotStyle ->
{Thickness[0.0025]},
FrameStyle -> {Thickness[0.004]}, Frame -> True,
FrameTicks -> {obenunten, rechtslinks, obenunten, rechtslinks},
FrameLabel -> {\ ..... \, \.....\}, RotateLabel -> True,
AspectRatio -> .5, ImageSize -> {550, 400},
DefaultFont -> {\Times-Bold\, 14}, FormatType -> OutputForm,
Epilog -> {Text[\200 MHz\, {0.23, 0.63}],
Text[\v = 0.04 m / nsec\, {1.55, 0.35}], Text[\v = 0.10 m / nsec\,
{1.23, 0.63 }]}]
:
:
:
pict6 = ListPlot[data6,....]
ois = Show[pict1,......,pict6]
Thanxs a lot for any help
Harry
--
Harald von der Osten-Woldenburg
Geophysical Prospection of Archaeological Sites
National Heritage Department of Baden-Wuerttemberg
Silberburgstrasse 193, D-70178 Stuttgart
Fax Office: +49-(0)711-1694-707
http://www.lb.netic.de/hvdosten : Geomagnetics, Geoelectrics, Radar, EMI
====
Suppose I have the following equation:
f(x,y) = const.
Now, as I understand it, this implicitly defines y as a function of x,
y(x). Suppose that I am able to solve for this explicitly. Next, to
compute the perimeter defined by this equation:
ArcLength = integrate[ sqrt(1+y'(x)^2) dx]
Now, we are up to my question: If I derive a unit vector tangent to
the curve defined by f(x,y)=const. called v such that =
0 at every point on the contour, how can I use this to compute the
same perimeter using polar coordinates. Note that del is the usual
gradient vector.
I am thinking of something like
ArcLength = integrate[F,dphi]
where F= which would evaluate to the
correct perimeter.
The question is how can I get at this mysterious some_other_function
By the way, I have tried a number of things like some_other_function =
ArcTan[x,y].
====
Probably seaching for Troubleshooting
in Help will help you.
Some ways of troubleshooting are
written there.
For example, to delete init.m file,
where default settings of notebook
are written.
*****************
suzuran
suzuran@kushiro-pu.ac.jp
***********************
----- Original Message -----
> so I reinstalled it, but this did
not get rid of the problem.
> Anyone out there have the same
problem - and if you know how to
> fix it I would be very grateful..!
>
====
what's wrong with a creation of the pure function
in MyTransf[]
Kern[a_, p_, q_] := Sin[a p q]
MyTransf[n_, func_, t_] :=
Module[{s, trafo},
trafo = Integrate[Kern[n, t, s] func[s], {s, 0, 2 Pi}];
Function @@ {trafo /. t -> #1}
]
than
r1 = MyTransf[m, foo[w, #] &, t];
and
MyTransf[l, r1[t], t]
work as exprected.
You may generate the pure function also in MyTransf[] first
with
MyTransf[n_, f_, s_, t_] := Module[{trafo, func, w},
func = Function @@ { f /. s -> #1};
trafo = Integrate[Kern[n, t, w] func[w], {w, 0, 2 Pi}]
]
but this is a bit strange because you easy mix up
the dummy variable s, you nesting mus now be written as
MyTransf[m, MyTransf[m, foo[w, s], s, s1], s1, t]
Jens
>
>
> I had the correct definition (this is only a simple demonstrative \
example):
>
> Kern[a_, p_, q_]:=Sin[a p q].
>
> The transform definition is
>
> (A) MyTransf[n_, func_, s_, t_] := Integrate[Kern[n, t, s] func[s], {s, \
0,
> 2 Pi}]
>
> The 'dummy' variable of integration, s, is imposed as an argument in the
> case the
> integral is not explicitly solved (and I want see it in the echo on the
> screen).
> I try (A) with a function depending on some parameters list w, es. \
foo[w,t]
> You suggest a pure function usage
>
> (B) MyTransf[m, foo[w, #]&, s, t] (*a function of t*)
>
> Applying again the transform I have to integrate in t so that
>
> MyTransf[n, MyTransf[m, foo[w, #]&, s, #]&, t, x] (*a function of \
x*)
>
> a not intuitive formula. I would prefer a new definition so that I can \
have
> instead of (B)
>
> (B') newMyTransf[m, foo[w, s], s, t]
>
> avoiding pure function since in this case applying the successive \
transform
> I can write
>
> newMyTransf[n, newMyTransf[m, foo[w, s], s, t], t, x]
>
> where the integration variables clearly appear coupled.
> How can I modify definition (A) to allow an usage like (B') ?
>
> More generally this problem happens every time a function is called as an
> argument of another function
> (and so on) and we want to maintain flexibility in renaming the \
independent
> variables.
>
> Roberto
>
> Roberto Brambilla
> CESI
> Via Rubattino 54
> 20134 Milano
> tel +39.02.2125.5875
> fax +39.02.2125.5492
> rlbrambilla@cesi.it
====
Does anybody know how to use Mathematica4.1 to get the following inverse \
laplace transform?
I have 8 parameters, a,b,c,d,w1,w2,w3,w4. (Where there is a constrain
that a+b+c+d=1)
The following is the script I tried.
-------------------------------------------------------------
f4s=aw1/(s+a)+bw2/(s+b)+cw3/(s+c)+dw4/(s+d)
fi=f4s/(1-f4s)
InverseLaplaceTransform[fi,s,t]
----------------------------------------------------------------
I tried to run it, but mathematica runs for ever and can not give me an
answer.
David
_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
====
a=Log[Log[x*Exp[x*Exp[x]] + 1]] - Exp[Exp[1/x]]*Log[x]
Limit[a,x->Infinity]
crashes the Math kernel in 4.1
at location 0x64008450
on Windows 2000.
RJF
====
you should consider to switch to a more stable
operating system. My IRIX 6.5 returns Infinity
Jens
>
> a=Log[Log[x*Exp[x*Exp[x]] + 1]] - Exp[Exp[1/x]]*Log[x]
>
> Limit[a,x->Infinity]
>
> crashes the Math kernel in 4.1
> at location 0x64008450
> on Windows 2000.
>
> RJF
====
I checked this with Mathematica 4.1 for MacOS X and discovered something
rather curious. If I use the Front End to try to perform this
computation the kernel quits. However, if I run the kernel without the
FrontEnd I get:
In[1]:= a=Log[Log[x*Exp[x*Exp[x]] + 1]] - Exp[Exp[1/x]]*Log[x]
1/x x
E E x
Out[1]= -(E Log[x]) + Log[Log[1 + E x]]
In[2]:= Limit[a,x->Infinity]
Out[2]= Infinity
Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/
> a=Log[Log[x*Exp[x*Exp[x]] + 1]] - Exp[Exp[1/x]]*Log[x]
Limit[a,x->Infinity]
crashes the Math kernel in 4.1
> at location 0x64008450
> on Windows 2000.
RJF
====
I am lookng for a review of Analog Insydes, the add-in electrical circuit
design software package for Mathematica. Can anybody suggest a web location \
where a review may be found? Or better yet what capabilities does Analog
Insydes offer that Pspice doesn't?
====
I have a problem with the {[]} keys... The keyboard is international
(or Norwegian, in particular) and these keys are mapped on a key
\Alt Gr\ to the right of the space bare combined with 7, 8, 9 and 0.
This works fine in all other applications, but not Mathematica.
This document,
http://library.wolfram.com/mathgroup/archive/1996/May/msg00124.html
specifies two solutions, but for me, non of them works.
The XMathematica-modification doesn't help, and the xmodmap-solution
breaks almost everything. Unfortunately, I don't really grasp the
workings of xmodmap, so I have difficulties understanding how to
overcome the problem using that solution, although I imagine it
would be possible.
Does anybody have a quicker fix than actually digging into xmodmap?
If so,
eternally gratefully,
Jens Olav Nygaard
====
> I have a problem with the {[]} keys... The keyboard is international
> (or Norwegian, in particular) and these keys are mapped on a key
> \Alt Gr\ to the right of the space bare combined with 7, 8, 9 and 0.
> This works fine in all other applications, but not Mathematica.
>
[*** snipp ***]
I once had this problem too with Mathematica 3, the solution was to add \
entries
in ..../FrontEnd/TextRessources/KeyEventTranslations.tr
Because I now use Mathematica 4.1 (where this problem has gone) I don't \
remember
exactly how these entries looked like.
Gruß Peter
--
=--=--=--=--=--=--=--=--=--=--=--=--=--= http://home.t-online.de/home/phbrf
Peter Breitfeld, Bad Saulgau, Germany Meinen GnuPG/PGP-5x Key gibts dort
====
> I have a problem with the {[]} keys... The keyboard is international
> (or Norwegian, in particular) and these keys are mapped on a key
> \Alt Gr\ to the right of the space bare combined with 7, 8, 9 and 0.
> This works fine in all other applications, but not Mathematica.
This document,
http://library.wolfram.com/mathgroup/archive/1996/May/msg00124.html
specifies two solutions, but for me, non of them works.
> The XMathematica-modification doesn't help, and the xmodmap-solution
> breaks almost everything. Unfortunately, I don't really grasp the
> workings of xmodmap, so I have difficulties understanding how to
> overcome the problem using that solution, although I imagine it
> would be possible.
Does anybody have a quicker fix than actually digging into xmodmap?
> If so,
You could use XKeyCaps, which is a front end to xmodmap.
http://linux.tucows.com/system/preview/10253.html
--
User Interface Programmer paulh@wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.
====
Carlos, there exists a software developed by Martin Kraus called
LiveGraphics3D, LiveGraphics3D is a non-commercial Java 1.1 applet to
display and rotate three-dimensional graphics produced by Mathematica in
HTML pages (Martin Kraus dixit).
There are more information in
http://wwwvis.informatik.uni-stuttgart.de/~kraus/LiveGraphics3D/
-----------------------------
Juan Egea García
Area de Tecnologías de la Información y las Comunicaciones
Aplicadas-Departamento de Matemática Aplicada
Universidad de Murcia (ESPAÑA)
jeg@um.es
----- Original Message -----
>
====
that is what, it is written for:
http://www.wri.com/products/webmathematica/
Jens
>
> Anyone can tell me how can i put de dynamic figures of mathematica in
> internet using some java module (if there exists)
>
> Carlos Vieira
====
The webMathematica product is designed to interact with Mathematica through
a web interface, and it's Java based.
See http://www.wolfram.com/products/webmathematica/ for a product
description.
It's easy to imbed webMathematica Mathlet tags in HTML code thus connecting
one's web page to Mathematica. At a more sophisticated level, one can \
write
Java servlet programs that can, for example, provide user interaction or
database processing while calling Mathematica, through the webMathematica
servlet, for its technical computing capabilities.
Tom Compton
> Anyone can tell me how can i put de dynamic figures of mathematica in
> internet using some java module (if there exists)
Carlos Vieira
>
====
\Carlos Vieira\ ha scritto nel messaggio
> Anyone can tell me how can i put de dynamic figures of mathematica in
> internet using some java module (if there exists)
Carlos Vieira
>
Two solutions:
http://wwwvis.informatik.uni-stuttgart.de/~kraus/LiveGraphics3D/index.html
http://www-sfb288.math.tu-berlin.de/vgp/javaview/
Raf.
====
integral, but did not know that one must distinguish between various \
definitions
of the integral in Mathematica (or in Maple). I think the \default\ \
integral
should be the most general, or most useful, definition of \integral\. \
Clearly
(in my opinion) the most useful definition of \integral\ would be (at \
least) the
\principal value\ integral; so if you ask for Mathematica's integral of \
this
function, what it returns is correct (i.e., most useful). My standard for
judgment is very practical: suppose you had a model for a real-word \
process
(e.g., designing an engine for a rocket), which required the evaluation of \
this
integral. Would you reject the design because the integral is, according \
to
some definition, \divergent\, or would you simply set the integral to \
zero, and
accept the model. I think almost all engineers would accept the model \
(assuming
that is the only possible problem), and I am certain that the engine would \
work
(assuming everthing else in the engine's design is correct). That means \
that
the \principal value\ integral really is the \correct\ answer. Other \
integrals
are simply wrong!
> Your question deals with the problem of defining correctly the value of \
such
> integral of a function taking on infinite value. The proper way is to use
> the so called \Cauchy principal value\ being defined (in your case) as:
> limit of Integral[Sec[x],{x,eps,Pi-eps}] when eps-->0
> Such limit is called the Cauchy principal value (noted vp) and does \
converge
> to zero in your case.
> Have a look to \PrincipalValue\ in the on-line help.
> Philippe Dumas
> 99, route du polygone
> 03 88 84 67 80
> 67100 Strasbourg
----- Original Message -----
> What is the definite integral of Sec(x), from 0 to pi? A textbook
> answer (Stewart, Calculus) is that it diverges.
> And that is the answer Maple gives (calling it \undefined\). But
> Mathematica returns 0.
> The integral is split into two improper integrals, from 0 to pi/2 and
> from pi/2 to pi. Each, by itself, diverges. The textbook definition
> requires both improper integrals to separately converge for the total
> integral to converge. By that definition, Maple is right. But does
> that make sense? The second improper integral is just the negative of
> the first, and they exactly cancel out for the antiderivative
> ln(abs(sec(t) + tan(t)) at any t close to pi/2. Why don't they exactly
> offset each other in the limit, as t goes to pi/2, and yield 0? Why
> shouldn't the integral be so defined, instead of the textbook
> requirement that the improper integrals must separately converge.
>
====
http://www.wolfram.com/solutions/mathlink/jlink/
and Swing or AWT. The GUI-Builder comes with your
Java-IDE, J-Builder, Visual Age for Java or what you like.
Jens
>
>
> We're frequently using Mathematica to code several different type of
> programs, more or less big ones. The notebook thereby is used for all
> kind of graphical (diagram) output and flow control.
>
> But we would like to build an own GUI around our Mathematica
> applications, e.g. like Motif, TK etc.. Is there any (free and easily
> understandable) GUI toolkit available for Mathematica ?
>
> Justus
====
it is nice, that we should make *your* home work for you!
Can you give us the e-mail of your teacher ? I would
like to inform him about that.
Solve[{409 - 166x + 17x^2 - 218y + 92x y - 10x^2 y + 34y^2 - 16x y^2 +
2x^2 y^2 == 0, 23 - 5x - 8y + 2 == 0}, {x, y}] // FullSimplify
{{x -> 5/2 + (7*I)/10 - Sqrt[104 - (255*I)/2]/5,
y -> 25/16 - (7*I)/16 + Sqrt[104 - (255*I)/2]/8},
{x -> 5/2 + (7*I)/10 + Sqrt[104 - (255*I)/2]/5,
y -> 25/16 - (7*I)/16 - Sqrt[104 - (255*I)/2]/8},
{x -> 5/2 - (7*I)/10 - Sqrt[104 + (255*I)/2]/5,
y -> 25/16 + (7*I)/16 + Sqrt[104 + (255*I)/2]/8},
{x -> 5/2 - (7*I)/10 + Sqrt[104 + (255*I)/2]/5,
y -> 25/16 + (7*I)/16 - Sqrt[104 + (255*I)/2]/8}}
Jens
>
> Currently doing a homework exercise and stuck on a question.
>
> Question:
> Find all values of x and y for which both
> 409 - 166x + 17x^2 - 218y + 92xy - 10x^2 y + 34y^2 - 16xy^2 + 2x^2 y^2
> and
> 23 - 5x - 8y + 2
> are equal to zero.
>
> Hence find expressions a and b (involving x and y) such that these two
> expressions are equal to a^2 + b^2 and a + b, respectively.
>
> Can anyone help or give any hints as I am struggling to grasp this \
question?
>
====
>Currently doing a homework exercise and stuck on a question.
Question:
>Find all values of x and y for which both
>409 - 166x + 17x^2 - 218y + 92xy - 10x^2 y + 34y^2 - 16xy^2 + 2x^2 y^2
and
>23 - 5x - 8y + 2
>are equal to zero.
Hence find expressions a and b (involving x and y) such that these two
>expressions are equal to a^2 + b^2 and a + b, respectively.
Can anyone help or give any hints as I am struggling to grasp this \
question?
>
Use explicit multiplication to avoid writing xy when you mean x*y.
Your second expression has two constant terms (23+ ... +2). Should one of
these involve a variable?
Solve[{409-166*x+17*x^2-218*y+92*x*y-10*x^2*y+34*y^2-16*x*y^2+2*x^2*y^2==0,
23-5*x-8*y+2==0},
{x,y}]//Simplify
Solve[{409-166*x+17*x^2-218*y+92*x*y-10*x^2*y+34*y^2-16*x*y^2+2*x^2*y^2==
a^2+b^2,
23-5*x-8*y+2==a+b},
{a,b}]//Simplify
Bob Hanlon
Chantilly, VA USA
====
I'm interested in comparing an ODE solver with the standard ones:
DOPRI,RADAU,HAIRER, etc.
Does anyone know if they are implemented in Mathematica?
====
AFAIK NDSolve[] use a Adams-Bashford/Adams-Multon
predictor corrector method, if the system is
stiff it switchs to the classical Gear algorithm.
When the Method is set to Runge-Kutta it uses probably
the classicak Runge-Kutta formula.
I have an implementation of the most recent
enbedded Runge-Kutta Methods in:
http://phong.informatik.uni-leipzig.de/~kuska/visualsupp/RungeKuttaNDSolve.m\
including the Dormand/Price 5(4) method and the 8(7) method.
The most methods have a continuous output and can compute
Poincare sections. All methods are written for systems of
first order.
The RADAU code of Ernst Hairer is for algebo equations
and Mathematica can't solve mixed systems of differntial
and algebraic equations. You can use the symbolic power
to eliminate the algebraic equations. I have a implentation
of Ernst Hairer's symmetric projection algorithm espcial
for symplectic integration
http://phong.informatik.uni-leipzig.de/~kuska/visualsupp/ManifoldNDSolve.m
that is impressive robust and should work well for index 1 algebros.
Jens
>
> I'm interested in comparing an ODE solver with the standard ones:
> DOPRI,RADAU,HAIRER, etc.
> Does anyone know if they are implemented in Mathematica?
====
There must be a simple answer to this:
I'm producing a large output file that takes a long time to compute, and I
think this is partly becuase Mathematica always has my output as 14 decimal
places, and I don't need such accuracy. Is there a way to reduce \
calculation
time by reducing the precision of all calculations in my model. Rounding
with N doesn't work.
Also, I'm told that I can reduce the time of my program by looking at a
debugging tool that tells me how long the program spends on certain parts \
of
my code. What is this?
Leanne Ussher
====
Numerics is not my area but the following may be of some help:
NIntegrate[Sin[x+y],{x,0,7},{y,0,7}]//Timing
{46.46 Second,0.323366}
NIntegrate[Sin[x+y],{x,0,7},{y,0,7},
PrecisionGoal->3]//Timing
{0.61 Second,0.323366}
In some cases we can restrict the number of significant digits used in
internal calculations.
Default setting of $MaxPrecision is 10^6
Block[{$MaxPrecision=3},
NIntegrate[Sin[x+y],{x,0,7},{y,0,7}]
]//Timing
NIntegrate::ploss: Numerical integration stopping due to loss of
precision. \\
Achieved neither the requested PrecisionGoal nor AccuracyGoal; suspect
one of \\
the following: highly oscillatory integrand or the true value of the
integral \\
is 0. If your integrand is oscillatory try using the option \\
Method->Oscillatory in NIntegrate.
{0.11 Second,0.323368}
Block[{$MaxPrecision=6},
NIntegrate[Sin[x+y],{x,0,7},{y,0,7},
PrecisionGoal->3]
]//Timing
{0.99 Second,0.323366}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay@haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
> There must be a simple answer to this:
I'm producing a large output file that takes a long time to compute, and \
I
> think this is partly becuase Mathematica always has my output as 14
decimal
> places, and I don't need such accuracy. Is there a way to reduce
calculation
> time by reducing the precision of all calculations in my model. Rounding
> with N doesn't work.
Also, I'm told that I can reduce the time of my program by looking at a
> debugging tool that tells me how long the program spends on certain parts
of
> my code. What is this?
> Leanne Ussher
>
====
There must be a simple answer to this:
I'm producing a large output file that takes a long time to compute, and I
think this is partly because Mathematica always has my output as 14 decimal
places, and I don't need such accuracy. Is there a way to reduce \
calculation
time by reducing the precision of all calculations in my model. Rounding
with N doesn't work.
Also, I'm told that I can reduce the time of my program by looking at a
debugging tool that tells me how long the program spends on certain parts \
of
my code. What is this?
Leanne Ussher
====
Will the latest version of Mathematica take advantage of two CPU chips on a
In other words, will Mathematica sense the presence of two CPUs and \
distribute
tasks to them both?
Dave
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
David E. Burmaster, Ph.D.
Alceon Corporation
POBox 382069 (new Box number effective 1 Sep 2001)
Harvard Square Station
Cambridge, MA 02238-2069 (new ZIP code effective 1 Sep 2001)
Voice 617-864-4300
Web http://www.Alceon.com
Email deb@Alceon.com
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
====
take a look at:
http://support.wolfram.com/mathematica/systems/allplatforms/multipleprocesso\
rs.html
Jens
>
>
> Will the latest version of Mathematica take advantage of two CPU chips on \
a
>
> In other words, will Mathematica sense the presence of two CPUs and \
distribute
> tasks to them both?
>
> Dave
>
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> David E. Burmaster, Ph.D.
> Alceon Corporation
> POBox 382069 (new Box number effective 1 Sep 2001)
> Harvard Square Station
> Cambridge, MA 02238-2069 (new ZIP code effective 1 Sep 2001)
>
> Voice 617-864-4300
>
> Web http://www.Alceon.com
> Email deb@Alceon.com
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
====
> Will the latest version of Mathematica take advantage of two CPU chips
In other words, will Mathematica sense the presence of two CPUs and
> distribute tasks to them both?
For all architectures upon which Mathematica runs, the answer is \no.\
--
User Interface Programmer paulh@wolfram.com
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.
====
Dear \37/32\ (hope you don't mind my calling you by your \
rationalization):
Take[list2,{m,n}] should work fine. Is it possible you really did use \
2list (which is 2*list)?
Ken Levasseur
Math. Sciences
UMass Lowell
Seems like the ticket is to just make a two dimensional array with the \
first entry being the x axis values and then ListPlot that array.
Now I have another question (as usual). I can reach out and grab a piece \
of a 1 dimensional list to plot by
> ListPlot[ Take[ list, {m,n} ] ] this plots list from entries m to n.
How do you do this with a 2 dimensional array so I can plot whatever \
section of the data I want?
> Example, if
> 2list = { {x1,y1}, {x2,y2}.....{xn,yn} }
How do I use Take[] or an equivalent to select a section of this list to \
plot? Nothing mentioned about
> this in the book that I can find. Tried a bunch of things with no luck.
What say ye cypherists?
> increment of a variable which I'd like to represent on the graph. About \
all I've been able to do so far is to rig up the list so that each entry in \
the array/list being plotted represents some integer multiple of the actual \
variable so things don't get
> too confusing. For example:
> x=Table[Sin[z],{z, 3.0, 0.01}];
> ListPlot[x]
> The plot looks nice but the x axis goes from 0 to 300 and I'd like it to \
go from say, 0 to 600 (MHz). Surely this is easily done but I haven't found \
a single example of this in the books or in reviewing the posts on this ng.
> Options[ListPlot] doesn't help me either.
> This is no problem when using Plot[] on a continuous variable.
> Rob
====
>I can reach out and grab a piece of a 1 dimensional list to plot by
>ListPlot[ Take[ list, {m,n} ] ] this plots list from entries m to
>n.
How do you do this with a 2 dimensional array so I can plot whatever \
section
>of the data I want?
>Example, if
>2list = { {x1,y1}, {x2,y2}.....{xn,yn} }
How do I use Take[] or an equivalent to select a section of this list to
>plot?
var[x_Symbol, n_Integer] :=
ToExpression[ToString[x]<>ToString[n]];
Clear[x,y,n];
data=Table[{var[x,n],var[y,n]}, {n,10}];
Take[data, {5,7}]
{{x5, y5}, {x6, y6}, {x7, y7}}
data = Table[{200z,Sin[z]},{z,0,3,.1}];
ListPlot[data, PlotJoined -> True];
ListPlot[Take[data, {11,26}],
PlotRange->{{0,600},{0,1.025}},
PlotJoined -> True];
Bob Hanlon
Chantilly, VA USA
====
For example:
Take[ {{x1,y1,z1},{x2,y2,z2},{x3,y3,z3},{x4,y4,z4}}, {2,3}, {1,2} ]
{{x2,y2},{x3,y3}}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay@haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
you all.
Seems like the ticket is to just make a two dimensional array with the
first entry being the x axis values and then ListPlot that array.
Now I have another question (as usual). I can reach out and grab a piece
of a 1 dimensional list to plot by
> ListPlot[ Take[ list, {m,n} ] ] this plots list from entries m to n.
How do you do this with a 2 dimensional array so I can plot whatever
section of the data I want?
> Example, if
> 2list = { {x1,y1}, {x2,y2}.....{xn,yn} }
How do I use Take[] or an equivalent to select a section of this list to
plot? Nothing mentioned about
> this in the book that I can find. Tried a bunch of things with no luck.
What say ye cypherists?
>
a long time of putting up with no solution. I have a list which I plot but
the integer x axis of the plot is not scaled to suit me. Each position in
the list results from some
> increment of a variable which I'd like to represent on the graph. \
About
all I've been able to do so far is to rig up the list so that each entry in
the array/list being plotted represents some integer multiple of the actual
variable so things don't get
> too confusing. For example:
> x=Table[Sin[z],{z, 3.0, 0.01}];
> ListPlot[x]
> The plot looks nice but the x axis goes from 0 to 300 and I'd like it \
to
go from say, 0 to 600 (MHz). Surely this is easily done but I haven't \
found
a single example of this in the books or in reviewing the posts on this ng.
> Options[ListPlot] doesn't help me either.
> This is no problem when using Plot[] on a continuous variable.
> Rob