MathGroup Archive 2003

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

Search the Archive

Re: Using InterpolateRoot Function in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41145] Re: [mg41127] Using InterpolateRoot Function in Mathematica
  • From: "Haritha Yalamanchili" <haritha12 at attbi.com>
  • Date: Tue, 6 May 2003 05:54:07 -0400 (EDT)
  • References: <8C4E0873828D210-958-F35@App2>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Bobby,

Thank you for the response. I did not enter the exact mathematica format, I
only used the symbolic notation to explain the problem (sorry if this caused
any confusion). Attached is the mathematica file I was using to solve for
the arclength.

deltay, beta and L0 are constants. Also L0 can be used as an initial guess
for the root (L).

I was able to solve this problem in another system, on one of my friends computer,
but I would prefer to solve in Mathematica , as I am more comfortable using
Mathamatica.

Any help that you could provide is greatly appreciated.

Thank You
Prasad
----- Original Message -----
From: "Bobby Treat" <drmajorbob+MathGroup3528 at mailblocks.com>
To: mathgroup at smc.vnet.net
Subject: [mg41145] Re: [mg41127] Using InterpolateRoot Function in Mathematica


> First, why write
>
> f(L) = Integrate[sqrt(1+z^2) dx] - L0 (Integration limits are from 0 to
> L)
>
> if you mean
>
> f[L_]:= Integrate[sqrt(1+z^2),{z,0,L}] - L0
>
> ??
>
> This leaves me wondering if you entered that, or something else.  The
> possible errors you MIGHT have made are endless, so it would really
> help if you just showed us the statement you entered.
>
> Secondly, what is L0?  Another unknown?  A parameter?
>
> Bobby
>
> -----Original Message-----
> From: Haritha Yalamanchili <haritha12 at attbi.com>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Sent: Sun, 4 May 2003 03:56:52 -0400 (EDT)
> Subject: [mg41145] [mg41127] Using InterpolateRoot Function in Mathematica
>
> Hi,
>
> I am trying to use Mathematica to find a value of "L" that satisfies the
> equation
>
> Integrate[sqrt(1+z^2) dx] - L0 = 0 (Integration limits are from 0 to L)
>
> where,
>
> z= -2 x(L C1 - 3 C2)/L^2 - 3 x^2(-L C1 + 2 C2)/L^3
>
> In order to find the value of L that satisfies the above equation, I
> have
> setup the problem in Mathematica as shown below. Can some one help to
> verify
> if the problem is setup properly of if Mathematica is capable of
> finding a
> root for such functions.
>
> ******
> f(L) = Integrate[sqrt(1+z^2) dx] - L0 (Integration limits are from 0 to
> L)
>
> InterpolateRoot[ f(L),{L,0,L0} ]
> *******
> (L0=13, C1=0.12, C2=0.25)
>
> Value of L is close to L0 and hence, L0 can be used as the initial guess
> value.
>
> Thank You and Best Regards
> Prasad


(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 

starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 

the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the
word CacheID, otherwise Mathematica-compatible applications may try to
use invalid cache data.

For more information on notebooks and Mathematica-compatible
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info at wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[      3281,        104]*)
(*NotebookOutlinePosition[      4047,        133]*)
(*  CellTagsIndexPosition[      3975,        127]*)
(*WindowFrame->Normal*)



Notebook[{

Cell[CellGroupData[{
Cell[BoxData[
    \(\(CleanSlate[];\)\)], "Input"],

Cell[BoxData[
    InterpretationBox[\("  (CleanSlate) Contexts purged: \
"\[InvisibleSpace]{"Global`", "NumericalMath`InterpolateRoot`"}\),
      SequenceForm[
      "  (CleanSlate) Contexts purged: ", {"Global`",
        "NumericalMath`InterpolateRoot`"}],
      Editable->False]], "Print"],

Cell[BoxData[
    InterpretationBox[\("  (CleanSlate) Approximate kernel memory 
recovered: \
"\[InvisibleSpace]"34 Kb"\),
      SequenceForm[
      "  (CleanSlate) Approximate kernel memory recovered: ", "34 Kb"],
      Editable->False]], "Print"]
}, Open  ]],

Cell["<<NumericalMath`InterpolateRoot`", "Input",
  CellTags->"S5.81.1"],

Cell[CellGroupData[{

Cell[BoxData[
    \(z = \(-\(\(2\ x\ \((L\ \[Beta] -
                    3\ \[CapitalDelta]y)\)\)\/L\^2\)\) - \(3\ x\^2\ 
\((\(-L\)\
\ \[Beta] + 2\ \[CapitalDelta]y)\)\)\/L\^3\)], "Input"],

Cell[BoxData[
    \(\(-\(\(2\ x\ \((L\ \[Beta] -
                  3\ \[CapitalDelta]y)\)\)\/L\^2\)\) - \(3\ x\^2\ 
\((\(-L\)\ \
\[Beta] + 2\ \[CapitalDelta]y)\)\)\/L\^3\)], "Output"]
}, Open  ]],

Cell[BoxData[
    \(\[CapitalDelta]y = 0.254\ 10\^\(-3\);
    L0 = 13\ 10\^\(-3\); \[Alpha] = 5; \[Beta] =
      Tan[\[Alpha]\ \[Pi]\/180];\)], "Input"],

Cell[BoxData[
    \(f[L_] := \[Integral]\_0\%L\(\@\( 1 + z\^2\)\) \[DifferentialD]x 
-
        L0\)], "Input"],

Cell[CellGroupData[{

Cell[BoxData[
    \(InterpolateRoot[f[L], {L, 10\ 10\^\(-3\), 13\ 10\^\(-3\)}]\)], 
"Input"],

Cell[BoxData[
    \($Aborted\)], "Output"]
}, Open  ]]
},
FrontEndVersion->"4.0 for Microsoft Windows",
ScreenRectangle->{{0, 1024}, {0, 723}},
WindowSize->{496, 565},
WindowMargins->{{0, Automatic}, {Automatic, 0}}
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of
the file.  The cache data will then be recreated when you save this file 

from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S5.81.1"->{
    Cell[2351, 70, 72, 1, 30, "Input",
      CellTags->"S5.81.1"]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S5.81.1", 3882, 120}
  }
*)

(*NotebookFileOutline
Notebook[{

Cell[CellGroupData[{
Cell[1739, 51, 50, 1, 30, "Input"],
Cell[1792, 54, 293, 6, 44, "Print"],
Cell[2088, 62, 248, 5, 25, "Print"]
}, Open  ]],
Cell[2351, 70, 72, 1, 30, "Input",
  CellTags->"S5.81.1"],

Cell[CellGroupData[{
Cell[2448, 75, 188, 3, 45, "Input"],
Cell[2639, 80, 183, 3, 45, "Output"]
}, Open  ]],
Cell[2837, 86, 154, 3, 40, "Input"],
Cell[2994, 91, 110, 2, 42, "Input"],

Cell[CellGroupData[{
Cell[3129, 97, 91, 1, 31, "Input"],
Cell[3223, 100, 42, 1, 29, "Output"]
}, Open  ]]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)



  • Prev by Date: Re: How change $AddOnsDirectory
  • Next by Date: Re: How change $AddOnsDirectory
  • Previous by thread: Re: Using InterpolateRoot Function in Mathematica
  • Next by thread: Re: Using InterpolateRoot Function in Mathematica