3/16/2023 0 Comments Integrate in mathematica![]() The function TrigExpand expands out trigonometric and hyperbolic functions. Some are demonstrated in the next section. Mathematica has special functions that produce such expansions. Compact expressions like should not be automatically expanded into the more complicated expression. The automatic application of transformation rules to mathematical expressions can give overly complicated results. Mathematica automatically transforms the second expression into the first one. For example, can appear automatically from Bessel, Mathieu, Jacobi, hypergeometric, and Meijer functions for appropriate values of their parameters.Įquivalence transformations carried out by specialized Mathematica functionsĪlmost everybody prefers using instead of. The sine function can be treated as a particular case of some more general special functions. The sine function arising as special cases from more general functions Sometimes simple arithmetic operations containing the sine function can automatically produce other trigonometric functions. Simplification of simple expressions containing the sine function If the argument has the structure or, and or with integer, the sine function can be automatically transformed into trigonometric or hyperbolic sine or cosine functions. Mathematica also automatically simplifies the composition of the direct and any of the inverse trigonometric functions into algebraic functions of the argument. Mathematica automatically simplifies the composition of the direct and the inverse sine functions into its argument. ![]() Mathematica knows the symmetry and periodicity of the sine function. The remaining digits are suppressed, but can be displayed using the function InputForm. In this case, only six digits after the decimal point are shown in the results. Mathematica automatically evaluates mathematical functions with machine precision, if the arguments of the function are machine‐number elements. Here is a 50‐digit approximation of the sine function at the complex argument. The next input calculates 10000 digits for and analyzes the frequency of the digit in the resulting decimal number. Within a second, it is possible to calculate thousands of digits for the sine function. The next inputs calculate 100‐digit approximations at and. Here are three examples: CForm, TeXForm, and FortranForm.Īutomatic evaluations and transformationsĮvaluation for exact, machine-number, and high-precision argumentsįor the exact argument, Mathematica returns an exact result.įor a machine‐number argument (a numerical argument with a decimal point and not too many digits), a machine number is also returned. Mathematica also knows the most popular forms of notations for the sine function that are used in other programming languages. This shows the sine function in TraditionalForm. This shows the sine function in StandardForm. These involve numeric and symbolic calculations and plots.įollowing Mathematica's general naming convention, function names in StandardForm are just the capitalized versions of their traditional mathematics names. Examples of evaluating Mathematica functions applied to various numeric and exact expressions that involve the sine function or return it are shown. The following shows how the sine function is realized in Mathematica. ![]() This is probably faster than trying to understand what Mathematica does.Introduction to the Sine Function in Mathematica Let me say that there is another way: Understand the integral you want to solve! You as human should see what type of integrand you have and you can check the literature, how those types are solved numerically. If you have achieved this, then you know what algorithm you have to implement or find in C++ library. Until you finally get equally good results. using specific MaxPoints, MaxRecursion, etc settings.using EvaluationMonitor to see where your integrand is sampled.In this tutorial you can find details about how Mathematica chooses the algorithm when NIntegrate uses Method->Automatic.Īfter this, you should study the help-page of NIntegrate carefully to understand how it works. I would start by analysing (in Mathematica) what algorithm is used for your integral. Nevertheless, if you are tackling one specific integral, I assume chances are very good that you can get similar numerical results by re-implementing some parts in C++ or using a library. This means, you probably have to re-implement Mathematica completely. First of all, it is impossible to completely rewrite NIntegrate because usually, it evaluates (parts of) the integrand symbolically to check for certain properties.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |