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

learn more… | top users | synonyms

1
vote
2answers
75 views

how do I control the output of Reduce function?

Reduce[x*y > 50 && x*y < 100 && x < 100 && x > 1 && y > 1 && y < 50, {x, y}, Integers] what if I want ...
0
votes
0answers
39 views
0
votes
0answers
37 views
1
vote
1answer
55 views

Distribute operator on functions

I wrote this code: ...
-4
votes
1answer
66 views

Apply If function to FoldList [on hold]

I have defined the following function: cpdz[c0_, m_,s_, r_, t_, n_] := If[c0 > 0, c0*(m*c0\s - (m - 1)*Exp[r*t/n]), c0*Exp[r*t/n]] for s I have a set of ...
1
vote
1answer
68 views

Generating a very large list of integers not divisible by a set of primes

I have read (58520), but the solutions there do not work when using a large maximum value because they rely on Range. For example, ...
0
votes
1answer
27 views

Using set of lists in if function? [on hold]

I have the following function: a3[m_, C_, St_, Stt_] := If[C > 0, (m*C)/St*Stt, 0] now my input for C, St and Stt are different set of lists. So I tried to ...
-6
votes
0answers
40 views

how to define a function as variable in mathematica [on hold]

how to define a function as variable in mathematica. please refer to attach picture. thanks.
0
votes
1answer
49 views

why does this function fail to return? [closed]

I have written 2 functions to calculate the stress and strain of a material, the strain function works perfectly, but the stress function which very similar to the Strain function did not return what ...
2
votes
2answers
94 views

Recursion: How can i program this expression?

i have the following expression: Vt[EA_, V0_, Cm_, B_] := EA + (V0 - Cm)*B For EA and Cm ...
1
vote
1answer
42 views

Show function seems to be broken [closed]

I read the thread How to make the Show function work in this case?. I think I have the same problem as discussed there. But when I try the to evaluate ...
1
vote
0answers
35 views

Can you define “| |” to be the same as “Abs[ ]”? [duplicate]

When calculating the modulus of a complex number in Mathematica, the standard (and probably least-ugly) way of doing it is by using the Abs[ ] function. When doing ...
0
votes
1answer
45 views

Generating sound according to a mathematical function [closed]

I would like to get sound clips that essentially are frequencies varying according to certain recognizable math functions like sin, tan, floor, absolute value etc. Please help. Thanks
0
votes
1answer
52 views
1
vote
1answer
32 views

Map a list of functions to a number [duplicate]

Suppose I have a list of functions like: listfun = { Sin, Cos, Tan } And suppose I want to map listfun to a single number <...
0
votes
1answer
82 views

Getting errors from NIntegrate when I try to plot my function

I am trying to 3D plot the function ϕ[σ, λ], but Mathematica keeps refusing to plot for the reason that the output involves complex numbers, even though by ...
0
votes
0answers
4 views

How to find x on this exponential function [migrated]

I'm not in math, but I really want to know how to solve this: 1,08^x = 100/55 I'm not able to factoring 100/55 to get the result. Can anybody say me how's the ...
3
votes
2answers
332 views

Maximum brightness of two gray scale images

I am using the answer of bill s in Greater operator should give greater element. Here he showed the example: ...
2
votes
1answer
41 views

Define return values for a function that is not of type Boolean

I have a function with more than two possible return values. A simplified example is the following function that classifies vertices of a graph according to their degrees: ...
2
votes
2answers
80 views

How to use NestWhileList with a function of two variables

I want to iterate a function of two variables in NestWhileList. Obviously it will need a termination condition. For example imagine I have this function: ...
-1
votes
0answers
35 views

How to find vertice by two angles and side? [migrated]

I know 'alpha', 'betta', length 'c', vertices: 'A' and 'B' How can i find the 'C'?
1
vote
1answer
81 views

Weird SeriesData behavior?

I was trying to calculate the determinant of a matrix whose elements are truncated series. As a result I obtained an expression like this: ...
1
vote
1answer
121 views

How to 3D-plot with specific ranges?

I have the following function which I want to plot using Plot3D: (-1 + w + 3 s w)/(2 (-1 + w + 4 s w)) , which is only ...
24
votes
1answer
614 views

Is the renaming mechanism of `With` flawed?

I'm confused about the renaming mechanism of With: ...
1
vote
2answers
52 views

Passing each element of a list as an argument to a single parameter function [closed]

Consider a single parameter function: g[w_] := w^2 +1; Consider a list: slist= Range[0, 100, 1]; Now when I apply function ...
0
votes
1answer
36 views

Defining a variable inside a function to reference it in the function

I am trying to define a variable and use it inside a function. However, I am having troubles calling the variable. For instance, I define the function ...
0
votes
0answers
66 views

Watched a Livestream with Christopher Wolfram, he used an operator that I can't find [duplicate]

I understand /., /@, /; and documentation exists in the normal way for all of those but I can find nothing on /*
0
votes
1answer
62 views

Why is FindRoot failing to evaluate this function? [closed]

I have a (somewhat long) script which runs cleanly until the very last stage. Here, I'm using FindRoot to attempt to parameterize implicit curves in the zero set ...
0
votes
1answer
57 views

How to plot a level set of a function $f(x,y)$ on Plot3D?

Suppose I have used Plot3D command to plot some surface $f(x,y)$. On this plot, I would like to clearly identify some level set of $f(x,y)$, let's say $f(x,y)=0$, and if possible, find the relevant ...
1
vote
1answer
84 views

How to define a function which takes another function as input in Module

Let $f$ be a function of $n$. I would like to define a function $A$ with module which takes $f[n]$ as input. So for example: ...
0
votes
1answer
82 views

Mapping a simple 2 variable function

Quick Question: What is the best way to map this function so it performs seperately for 102 different values of x? ...
0
votes
0answers
31 views

Basic Question on function of $n$ when it shift to $n-1$ [duplicate]

This question is basic, but I do not know what is wrong. Clear[a0,a] a0=n; a[n_]:=a0 But when I evaluate a[n-1] the output ...
3
votes
1answer
248 views

Reduce a complex inequality

Reduce[Abs[1/(1 + I/Sqrt[α])] < 0.5, {α}] It is taking long time to run. Can any one help me to get the reduced condition in terms of $\alpha$ or its modulus. ...
0
votes
1answer
58 views
1
vote
1answer
62 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
0
votes
1answer
59 views

How to draw a contour line that intersects with a specified line (perpendecular to xy plane)?

Assuming I have the 2D scalar field $f(x,y)$ and I want the contour line of $f$ that intersects with the line $x=2,y=3$. How can I do that? At further steps I want the equation for that contour line....
0
votes
1answer
99 views

Find the equation of the parabola and sketch the graph [closed]

Consider the following information: A quadratic function with equation $f(x) = ax^2+ bx + c$ passes through three points, $A(-1,-1), B(1,-7)$ and $C(3,3)$.
3
votes
2answers
141 views

Integrate on a contour in the complex plane

I want to integrate the function f[z]= z + Conjugate[z] over a circle of radius 2 centered at the origin. For the sake of stating something that I have tried: <...
0
votes
1answer
60 views

How to use part specification as a function [closed]

I need to define elements of a matrix as functions; For instance the element "Q_nk" of the matrix "Q", to be defined as: Part[Q, n_, k_] := ... So, I cannot do that and receive the error message "n_ ...
3
votes
4answers
201 views

Plotting the solution of $\sin(x)\sin(y)$ + elliptic cylinder

I have a problem with one of my school project :( I need to add function: $\sin(x)\sin(y)$ to elliptic cylinder $\left(\frac x a\right)^2+ \left(\frac y b\right)^2 = 1$ After few hours, only this ...
0
votes
1answer
55 views

function definition, $ symbol apparition after variables [closed]

I have a proble with a system of two differential equations ...
0
votes
0answers
59 views

Solving a system of equations with conditional functions

With your help i am getting closer to the solution of my problem. I know that the code is long but most of it is boring definition. At the beginning i am just defining function, which works at the ...
0
votes
0answers
21 views

domain of an input variable

Suppose I have a function called Exercise which is called in this way: Exercise[Gamma[x]+x*n,x] How can I indicate that n is a positive integer?
-1
votes
2answers
146 views

How does one check a function monotonicity? [closed]

http://i.stack.imgur.com/JOS9o.png the question is to analyze $f(x)$ for monotonicity. I know I need to use D[f[x], x] and check if it is less than or greater to ...
1
vote
0answers
21 views

Express anonymous with formal parameters [duplicate]

I'd like to express the function F = Function[{#2[[1]] + #1[[2]]/#1[[1]], #2[[2]] + 1/#1[[1]]}] using explicit formal parameters. I've tried ...
0
votes
2answers
46 views

How to replace the argument of a function?

For the following expression, b'[x y/z]+z b''[x y/z] I want to replace the argument of b such that the above expression becomes ...
0
votes
1answer
56 views

How to Write a code to automatically generate the planckian locus in (u,v) space [duplicate]

in the CIE XYZ color space the three coordinates defining an electromagnetic spectrum are given by XT=∫x( λ ) M( λ , T )dλ, YT=∫y( λ ) M( λ ,T )...
1
vote
1answer
38 views

How to call a function with an arbitrary list as its arguments inside a functional? [duplicate]

I have the following functional defined (i.e. a function of another function) where variableList contains the variable (arguments if you wish) of the ...
4
votes
0answers
92 views

Argument attributes for pure functions [duplicate]

In his book, Leonid Shifrin says: One important limitation of the # - & notation for the pure functions is that it is ...
0
votes
1answer
39 views

Replace argument of delayed function before it evaluates [duplicate]

How should I use replace so that f[x_] := x^2 Replace[f[3], 3 -> 1] OUT = 9 evaluates to 1, instead of 9? This way, the replacement of the argument is done ...