Questions about the use of built-in Mathematica functions, including pure functions.

learn more… | top users | synonyms

3
votes
2answers
213 views

How to copy a function by value?

I need to change a function symbol multiple times by assigning another symbol to it, but when I'm trying to do that the symbols overwrite each other. I'm assuming this is because the assignment is by ...
0
votes
1answer
56 views

nested series expansion

I have to invert the following matrix in which the functions U[t,x,y,r] and K[t,x,y,r] and all their derivatives are "small"; ...
1
vote
0answers
23 views

Minimizing roots of a transcendental equations [duplicate]

I'm trying to use the solution of FindRoot with parameters for further calculations. Annoyingly enough it always gives me trouble with replacing the parameters. As an example I'm attaching a simple ...
1
vote
1answer
68 views

Selection of the position of the variable

I defined a function funloglogplot to make a loglogplot of a function (function1) depending on several variables ...
0
votes
1answer
74 views

How can I represent this automorphism of Q(i,a)?

Let $a$ represent some real irrational number. I am trying to perform computations with an automorphism $f:\mathbb{Q}(i,a)\to\mathbb{Q}(i,a)$ which fixes $\mathbb{Q}(i)$ pointwise and maps $a$ to $i ...
1
vote
0answers
37 views

How can I use the Rules returned by FindFit? [closed]

When I evlauate data = RandomReal[10, {5, 10, 2}]; fit[i_] := FindFit[data[[i]], a Sin[x] + b, {a, b}, x] fit[1] I get something like: ...
0
votes
0answers
51 views

Fold Dynamic Function [duplicate]

I'm making on a demo working with differential equations as functions of two variables (x and y). The demo will have to Fold the differential equation with an initial y-value and a series of x-values. ...
0
votes
0answers
123 views

Calculating the Lyapunov Exponent/Spectrum for the Duffing Oscillator

Some fellow students and I are trying to calculate and plot the Lyapunov spectrum for the Duffing oscillator (currently a test approach). Each of us has Mathematica knowledge based purely on past ...
0
votes
0answers
87 views

A problem with functions and Infinite expression 1/0 encountering

Following code (function) makes integrals and then replace f[x] with Cos functions and calculate the definite parametric ...
0
votes
1answer
104 views

A problem with set values

The following code is just an example to clearly explain my problem. Assume that : ...
3
votes
2answers
122 views

Need to create a function to generate all permutations of Range[$n$] [duplicate]

Basically I need a function that takes a list and gives all the possible permutations of it. The reason I can't use Permutations is that I have to apply another ...
1
vote
1answer
90 views

What is happening in Map[Function[x, x^2], a + b + c] from the Pure Function tutorial

The Pure Function tutorial gives an example: Map[Function[x, x^2], a + b + c]. I would expect the output to be (a + b + c)^2, ...
4
votes
2answers
235 views

Understanding Transpose

It is very likely that it is my lack of math skills that is showing up here. However, I think Transpose is such an important function that I need to master it. So I ...
2
votes
1answer
90 views

Dynamically Updating Function

I use Mathematica 8 and am working with DynamicModule. I'm trying to enter a function in an InputField then later apply it to two values entered in subsequent Input Fields. The function just does not ...
2
votes
0answers
53 views

Can BreadthFirstScan be modified?

I would like to obtain a "slick" implementation of A*-search algorithm on Graph objects, using the built-in BreadthFirstScan (if that is possible at all). I noticed that BreadthFirstScan is static in ...
0
votes
0answers
24 views

JacobiCN inaccuracy

For my calculations I need JacobiCN[s,k] for s near 0 from the left and k near 1 from the ...
8
votes
3answers
303 views

How to protect functions in a Mathematica Package?

I'm writing a Mathematica Package with many functions, but only two can be seen/public. I have: ...
0
votes
1answer
73 views

Is there a function for falling factorial in Mathematica

If I had to construct a function for falling factorial in mathematica I'd do something like that (hope I'm not mistaken): fallfact[x_,k_]:=$\prod_{j=0}^{k-1}(x-j)$ But is there a built-in ...
6
votes
2answers
224 views

Binomial[-1,-1]

According to various sources e.g. http://www.proofwiki.org/wiki/Definition:Binomial_Coefficient and Wolfram themselves http://functions.wolfram.com/GammaBetaErf/Binomial/02/ , the binomial ...
2
votes
1answer
98 views

Symbolically Expanding One-Variable q-hypergeometric Series

In general, how do I get Mathematica to symbolically expand various infinite series to an arbitrary degree of accuracy? I deal with q-hypergeometric series quite frequently, and specifically want to ...
3
votes
1answer
177 views

Put random points into a specific 2D subregion

I want to cover a particular subregion of the x-y plane with a random distribution. As this particular region is not a circle I encounter some problems declaring the permitted zone where to put ...
3
votes
3answers
208 views

Finding a better way to define a matrix

I first defined a 171x171 matrix containing only zeros and then replaced 18 specific rows with nonzero entries. The other $153$ rows will be average of $2$ of the existing $18$ rows. Rows $2$ ...
1
vote
2answers
107 views

Given an equation with one parameter, how do I use NSolve to solve it for many values of the parameter?

I was wondering if there was a way to use the Mathematica NSolve command to solve an equation that has a parameter with various values. An example of which is: ...
1
vote
3answers
171 views

How to update a list in a function in each iteration

There is a list with numbers 1 to 8 ( p1 ) and another list (j) which contains 4 numbers which shows different 4 positions of ...
0
votes
1answer
68 views

NDSolve accuracy related problem

I want to solve this equation: ...
2
votes
1answer
81 views

Problems with BSplineFunction vs. BSplineSurface

Why are those surfaces different? ...
0
votes
0answers
57 views

For loop efficiency [duplicate]

What is a more efficient way of solving this problem? By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms. ...
-1
votes
1answer
88 views

Transformation of a simple logic statement

I'm designing a logic circuit and I was wondering if the following two things are equivalent: (x <= y) and (x < (y + 1)) I can't think of any set of numbers that would make these two things ...
0
votes
1answer
46 views

How to put some values from a list into a function in a Do loop

I want to program a code in MATHEMATICA in order to calculate some values in different iteration. For example, assume this list: list={1,2,3,4,5} Now assume that ...
1
vote
2answers
75 views

Avoid making repeated Random Integer in different iterations

Assume following code : Do[ i1 = RandomInteger[{1, 5}]; i2 = RandomInteger[{1, 5}]; While[i1 == i2, i2 = RandomInteger[{1, 5}]] , {k, 1, 4}];` This ...
6
votes
1answer
226 views

Why won't my function plot?

If I define ...
1
vote
2answers
124 views

How to evaluate Modules in a notebook from another notebook?

I would like to create a notebook populated with several modules and be able to evaluate these modules by running a separate notebook. I have attempted several uses of the ...
1
vote
2answers
151 views

Plot a function which depends on itself

How can I plot a stepwise function like f[a, t] = 10 Exp[-0.1 Sin[t]] for a > t and ...
0
votes
1answer
78 views

Normalize equation in NDSolve?

I have numerically solved and plotted the solution to the Mathieu equation using NDSolve successfully, as below: ...
4
votes
0answers
55 views

FlipView can't handle CurrentValue[“MouseOver”]. Kernel crash

Is this code crashing your Mathematica session? (it can so look out :P) ...
0
votes
0answers
36 views

Panel size undesired behaviour

This is next question from the series: better avoid Panel if you care about details. previous about FrameMargins In the ...
0
votes
0answers
55 views

Passing optional parameters to functions

Assume I want to write a function which has to have an argument structure like myFunction[variable_,parameters_] for compatibility reasons. Where parameters ...
0
votes
1answer
83 views

Populating an array with outputs of a function [closed]

I have searched, but didn't find much help on my issue. I have an optical physics problem that I'm working on .. ...
0
votes
1answer
93 views

Evaluate integral of a series

I want to evaluate this integral, but it won't work. Does anyone knows why? ...
0
votes
0answers
123 views

Intersection of any triangle with a circle in Cartesian coordinates

I started a notebook dealing with metrics in a triangle and its intersection points by a circle. Up to know I reached the point of having plotted a triangle, a circle with an arbitrary centre and I ...
3
votes
0answers
103 views

“Off-label use” of Mathematica functions for performance

Assisting an acquaintance with a simulation where a very large number of binomial probability calculations are required, I pointed them to a slightly obscure function to dramatically speed up their ...
4
votes
4answers
753 views

“do … while” loop equivalent in Mathematica [closed]

Have I missed something or is there no built-in which mimics the behaviour of do ... while loop? I am looking for a construct that evaluates procedure once and ...
3
votes
2answers
191 views

DynamicModule/Dynamic CheckboxBar Slow for Large Lists

I am trying to create a dynamic construct that takes a large list of expressions and allows the user to interactively select any number of entries for further manipulation. This is what I have ...
1
vote
2answers
108 views

How to work with lists of functions

I have some lists of interpolated functions and I want to know if there is an easy way to operate with them. A simplified example: ...
0
votes
1answer
83 views

Working with functions

I am required to write a function that takes a function as a parameter. ...
1
vote
1answer
89 views

Problem with System`Graph and Combinatorica`Graph functionality conflict

I'm trying to generate a random geometric graph. When evaluating HighlightGraph, even if I am passing graph object Mathematica always gives error like A graph ...
0
votes
1answer
74 views

mathematica apply list of functions to the same arguments [closed]

How can I apply list of functions to the same arguments? e.g. ApplyFun[{fun1,fun2,fun3},{arg1,arg2}] I looked here and could not find: ...
1
vote
0answers
36 views

How to apply an rule to factors matching a certain form

Suppose we have many expressions involving irrational ArcTan expressions (such as ArcTan[Sqrt[3],5]) along with other irrational factors (such as ...
1
vote
1answer
113 views

Time Varying Payoffs?

I'm trying to write some code that will return the final value of an annuity whose monthly payouts may or may not be constant each month. Right now I have working code for constant payments, but I'm ...
3
votes
1answer
75 views

How to apply RootLocusPlot corectly

I have to analyze the complex regions of variable c which is define obtained with InverseLaplace help in the form ...