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

learn more… | top users | synonyms

0
votes
0answers
50 views

Froze Mathematica and now it's buggy

Today I was trying to generate some fractals, and I had the bright idea to generate an over 10000px by 10000px image. When I went to save it, mathematica froze up and my computer told me I was running ...
0
votes
0answers
35 views

Derivation: How do I derivate this [migrated]

How do I deveriate the following expression? The problem I have is the n in d^n. This expression is part of a bigger task of mine : Show via complete induktion that is true for all n from ...
0
votes
0answers
43 views

Need to utilize FindFit with specified x variable values [on hold]

I have a function that I need to fit multiple (5) input values for, but I only have the function defined for 12 specific variable x values due to the need to ...
1
vote
2answers
53 views

Incomplete Integration in Area

Area[2 Sqrt[(1 - p^2)^2 - r^2], {p, 0, 1}, {r, 0, 1 - p^2}] is able to perform only the integral over r, leaving the integral ...
0
votes
0answers
52 views

Function that adds up every element in an array [on hold]

I'm trying to write a function that adds up every element in an array up to a specific index. I've tried the following: ...
0
votes
0answers
36 views

Plot function failure, and understanding how mathematica selects recursion points for correction

I think it is best to start out by directing everyone to this link. The discussion concerns why the Plot function fails to accurately generate a simple sine wave for given parameters. The answer given ...
0
votes
1answer
53 views

How to fill a Marshal buffer with whitespace using NETLink

Further to Todd Gayley's answer on string handling in a DLL function, I have the following code: ...
0
votes
1answer
39 views

Aborting from a Dialog box

I'm trying to abort a While cycle, with a dialog box. I've tried the following: ...
4
votes
0answers
54 views

Can one generate the default output of Hash[expr] (from Mathematica <= 9) in Mathematica 10

Mathematica 10 silently changed the behavior of Hash when the algorithm is not specified explicitly using an option. Is there any way (such as an undocumented ...
3
votes
1answer
134 views

Function that returns the second argument of Reap

I'm trying to create a function that returns only the second argument of Reap. Here's my naive guess of how it would go : Reap2[x_]:= Flatten[Reap[x][[2]],1] ...
5
votes
0answers
70 views

More Ticks::ticks errors in AbsoluteOptions in v10

Bug introduced in 10.0.0 While the specific bug affecting Plot described in AbsoluteOptions prints error messages in V10 has been fixed in 10.0.2 there remain ...
0
votes
1answer
47 views

About choosing the specific number for a function

If I have many numbers in here {{A,B},{C,D},{E,F}.....} And I want choose the B,D,F,....(the second number) to run a function y=f(x), where x=B,D,F.... Then I need to check if y=f(B) is equal to A or ...
-1
votes
0answers
36 views

Watching recursion

I enter: Clear[f]; f[n_] = n f[n - 1]; f[1] And get the response: $RecursionLimit::reclim: Recursion depth of 1024 exceeded. >> Now, I think what happens is ...
0
votes
3answers
72 views

choose any number e that is relatively prime to n

I try to write a command that means choose any number e that is relatively prime to n, like e^n [Congruent] 1 (mod n), but it didn't give me a value of e. e^n [Congruent] 1 (mod n)
0
votes
0answers
71 views

How to conveniently stop a programme without aborting the computation

I have a programme that will have to run for a few days. However, I would like the user to have the option of stopping the computation of the code, without aborting it, when he desires, without ...
0
votes
0answers
40 views

Regarding Cycles and Lists of Functions

So, I'm trying to determine the Normal Matrix of a Least Squares Aproximation; I have a basis constituted by 8 functions f1,f2...f8; I have 9 points which constitute Datax = {x1,x2...x9} Now, I ...
4
votes
3answers
136 views

What is shorthand way of Reap list that may be empty because of zero Sow

Sometimes because of conditionals, you cannot guarantee that Sow will be called at least once. Reap[Sow[1]][[2,1]] results in ...
0
votes
2answers
57 views

Binding trigonometric terms

I have many terms like A = Cos[Pi/18 + 2 x] + Cos[Pi/18 - 2 x] and I want to convert A to ...
1
vote
3answers
59 views

Defining a function using a preceding expression

How can I automatically define a function inside my Mathematica code using a result (expression) that preceded the point of definition. For example: ...
1
vote
1answer
99 views

Quantize a real-valued function?

I'm wondering if there's a built-in way in Mathematica to take a function whose output values are continuous, and quantize it to produce a step function. For example, I have the function ...
1
vote
0answers
36 views

How to package a function for export?

I often post code for functions on Stack-Exchange, and then later find that they are unexecutable - that people can't use them because I mistakenly omitted some private functions or values that are ...
14
votes
2answers
210 views

Where is the old option TraceInternal->True?

Already at least in version 2 (I think), the function Solve calls the function Roots. At that time, I had a rather dirty trick, that still works, to verify this: ...
0
votes
1answer
48 views

Defining a function with algebraic parameters

I am trying to define and use a function to represent the eigenstates of a Quantum Harmonic Oscillator, which have the general form: $$\psi_{n}(x) = \frac{1}{\sqrt{2^{n} n!}}\left(\frac{m \omega}{2 ...
2
votes
2answers
56 views

Define function over expression

Suppose I have the following expression system = x + y + z And I would like to define a function that contains this function, without explicitly typing the right ...
0
votes
3answers
71 views

Defining a function which displays odd numbers? [closed]

Define a function that takes as input an integer n and returns as output the product of the first n odd numbers., i.e., 1 · 3 · 5 · · · 2n − 1. Evaluate your function at 1, 2, 3 and make sure you get ...
4
votes
2answers
96 views

Difference between Evaluation>>Quit Kernel and Quit[]

What is the difference between Evaluation >> QuitKernel and Quit[]? Both seem to quit the kernel (and clearing all ...
0
votes
2answers
673 views

How to find volume of an egg [closed]

I am a first time user of mathematica. I've been trying to figure out how to find the volume of a) f(x)=(ax^3 + bx^2 + cx + d)sqrt(1-x^2). I have been scouring the internet for a solution on how to ...
3
votes
0answers
55 views

Lists for built-in functions that can work without brackets

I just noticed that Exit and Quit can work without brackets i.e. a single Exit or ...
1
vote
1answer
62 views

FinancialData Input

What does the function FinancialData require as input for natural gas: http://finance.yahoo.com/q?s=NGG15.NYM Is it easier to export the natural gas data to ...
11
votes
4answers
512 views

Generating Random Real numbers with certain numbers not included

I'm writing a program that i need 1000 real number between -3 and 6. the code that I used for generating and saving them was l = RandomReal[{-3, 6}, 1000] But I ...
0
votes
0answers
38 views

RegionPlot fails when given function with internally redefined variables

I've just upgraded to v10, and have noticed that some of my trusty old notebooks which used RegionPlot now fail to run. I've boiled down the problem I'm having to ...
0
votes
0answers
31 views

Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
1
vote
1answer
42 views

Composition of Multivariable function

I am trying to compose functions of xleft, maybe like xleft[xleft[f]] or even higher order. And here is my function: ...
0
votes
1answer
73 views

Diffentiating a function f with respect to x [duplicate]

I have a tabe y={10,20,30,40...} and x={62,63,64,65...} y is a function f and this function needs to be interpolated. How do I defferentiate the function f with respect to x?
2
votes
1answer
233 views

How to make a function from body with variable number of arguments?

Suppose I have an UNKNOWN function, which generates formulas with given number of x[i]. ...
0
votes
1answer
40 views

Taking function output as shown, and processing it regardless of its history

I am making some symbolical calculations for my quantum chemistry class. I am supposed to build a wave function composed of multiple other functions, each of which is also composite of some lower ...
0
votes
1answer
49 views

What is the simplest way to obtain function obect of a given function?

Suppose I have a function p of some arguments: p[x_,y_]:= (* something *) Now I with to pass this function as an object to ...
1
vote
2answers
140 views

How to tell Mathematica that certain variables are real/imaginary, integer-valued, etc

I'm trying to expedite some quantum mechanical calculations by running them through Mathematica. Expectation values and stuff like that. When I say, for example, ...
1
vote
1answer
105 views

Why does LyapunovSolve solve non-standard form?

LyapunovSolve[A,Q] solves the equation $A P + P A^T = Q$ for $P$ whereas the standard form (wikipedia,lecture notes, p.25, linear control systems) of the Lyapunov ...
6
votes
3answers
176 views

How to define a nested function like this?

For example, I want to calculate the limit of $\frac{1}{1+\frac{2}{1+\frac{3}{1+\ldots}}}$. So I want to define: $f(1)=1$ $f(2)=\frac{1}{1+2}$ $f(3)=\frac{1}{1+\frac{2}{1+3}}$ Then I calculate ...
0
votes
1answer
46 views

Mathematica Lattice Reduce Command

I'm going through a very old copy of "Mathematica: A System for Doing Mathematics by Computer" for self practice. I'm on chapter 3, and ran into the LatticeReduce ...
2
votes
2answers
114 views

cycloid parametric [closed]

How do I enter 3 parametric equations for cycloids corresponding to circles with radii 1, 2, and 4. I have tried ...
1
vote
0answers
71 views

Crosscorrelation for nonperiodic signals

I want to detect patterns (of an absorption spectrum which is nonperiodic) with Mathematica automaticly. I have found CorrelationFuncion but as far as I understand, ...
5
votes
3answers
153 views

Missing control for depth of Inner

Working on a mechanics problem, I stumbled on something peculiar: Since Inner is a generalisation of Dot, it changes its ...
1
vote
2answers
45 views

How to add a part of a list to a function?

I want to be able to add a specific portion of a list to a part of a function but this fucntion intakes 6 variables where as the list is of example: ...
1
vote
0answers
30 views

Why the same function defined by Set and SetDelayed look different? [duplicate]

I am novice to Mathematica and maybe my question looks kind of silly, but nevertheless here is it. I input two functions: ...
2
votes
1answer
108 views

Show how Eliminate arrives at reduction

Does anyone know how to get Mathematica to show how it arrives at the following result? ...
1
vote
1answer
69 views

Help creating a simple function

Can someone help me to create a function. The truth I'm new in Mathematica and I don't understand well the way functions work in I. I need a function that animate some rectangles according to a curve ...
3
votes
1answer
72 views

Integrate[] does not work when the function has an antiderivative function

This function (1 + (1 + 1/(2*Sqrt[x]))/(2*Sqrt[Sqrt[x] + x]))/(2*Sqrt[x + Sqrt[Sqrt[x] + x]]) has the antiderivative function, since ...
-1
votes
1answer
76 views

Putting two functions in one manipulate plot

I have a problem that is somewhat related to this http://stackoverflow.com/questions/7727668/putting-two-plots-in-a-manipulate-whilst-keeping-the-plots-visible but I would like to plot two functions ...