Linked Questions

5
votes
5answers
173 views

On reimplementing the Select function [duplicate]

I am working through the course Programming Paradigms via Mathematica. One of the exercises asks that you construct a function that mimics Select,even with three ...
1
vote
3answers
186 views

How to define a function based on the output of DSolve? [duplicate]

I would like to define a function based on the output of the following DSolve call: ...
3
votes
1answer
117 views

Check if an inequality holds among the solutions returned by Solve [duplicate]

Let's say I solve a system: Solve[{a == 3* c, b == 2 *a}, {a, b}] and then want to see if the values found for a and ...
0
votes
2answers
107 views

Replace doesn't replace the denominator [duplicate]

I have the following expression in Mathematica -((E^(2 - 2 Sqrt[(x[1] - x[2])^2]) (x[1] - x[2]))/Sqrt[(x[1] - x[2])^2]) I want to replace anything of the ...
0
votes
1answer
121 views

Fitting a Function With a Numerical Integral [duplicate]

I am having trouble using FindFit with the following function. ...
0
votes
1answer
115 views

Do loop - variable does not change [duplicate]

I got the follwing code which should add a '1' 100 times to an empty list. plotVals = {} Do[Append[plotVals, 1], {l, 1, Nmax}]; The output is again an empty ...
0
votes
0answers
111 views

The /. syntax in numerical methods [duplicate]

I have an analytical approximation method for solving an ODE and want to compare this to an NDSolve solution, but the syntax is confusing me. To get the solution from NDSolve, I define the ODE as eqn ...
0
votes
0answers
74 views

Assigning the answer of Solve to a variable [duplicate]

If I enter Solve[(x-2)(x+2)==0,x] then the answer comes up as {{x -> 2}, {x -> -2}} I want to make two variables ...
1
vote
0answers
70 views

Defining a Function, := versus = [duplicate]

Consider: ...
0
votes
1answer
60 views

Plot not displaying [duplicate]

I'm trying to perform a basic plot to show that two equations align, but I'm not getting any results. Plot[{[Pi]*Cos (3 x - [Pi]), [Pi] * Sin (3*[Pi] - 3 x)}, {x, -3 [Pi], 3 [Pi]}] To me this seems ...
0
votes
1answer
52 views

Stop function evaluating input at time of definition [duplicate]

I would like to create a function that acts on whether the input is even or odd, e.g.: In[644]:= f[a_] = If[EvenQ[a], 2 a, 3 a]; f[2] Out[645]= 6 I've ...
0
votes
0answers
48 views
0
votes
1answer
34 views

Storing solution to x and y [duplicate]

If I do sol=Solve[{2x+2==y,3x+9==y},{x,y}] then Mathematica will tell me {{x -> -7, y -> -12}} But I would like to ...
0
votes
0answers
41 views

How to fit ODE's coefficient, just like using NMinimize [duplicate]

I want to fit ODE's coefficients to a model. I tried using NMinimize, but it seems it does symbolic instead of numerical calculations. ...
0
votes
0answers
39 views

How to manipulate lists to get only part of the value [duplicate]

This is really a question about manipulating the output of Maximize. I have a function of 2 variables, defined thus: ...

15 30 50 per page