« first day (1479 days earlier)      last day (3002 days later) » 

12:13 AM
The OP seems to have found the error in this question. Should we close it?
5
Q: Find regions in which the roots of a third degree polynomial are real

ClarettaI have to find the roots of a third degree polynomial in $\phi$ that depends from 3 parameters, namely $t,s,w\in \mathbb R$. In order to do that I've used the command Solve, in the following way: Solve[ 1/6*ϕ*(t^2 + ϕ^2) - 1/2*t*(s + (t*ϕ)/2) +w - (s*ϕ)/2 + 1/12*t*(t - ϕ)*ϕ == 0, {ϕ}] Ma...

 
 
11 hours later…
11:23 AM
@Emad (1) There's an inconsistency in the code fragment/error posted: Subscript[a, 2] is not the same as a[2]. (2) To approximate a solution to f == 0, g == 0, etc., minimize {f, g,...} . {f, g,...}, leaving out == 0. One could use a different norm if more appropriate. In Mathematica, you can only get one solution (at a time) this way. (3) Another approach is to solve six equations and select the solutions that satisfy the seventh.
 
 
5 hours later…
4:45 PM
I'm blanking on what should be a simple Cases statement. If data is a list of {x,y} Reals (datapoints in this case) and I want the points at x = Range[5], how do I set up the pattern?
 
5:01 PM
@bobthechemist Cases[{{2, 8}, {6, 1}}, {_?(Between@{1, 5}), _}]
Or
Cases[{{2., 8}, {2.5, 8}, {6, 1}}, {_?(MemberQ[N@Range@5, #] &), _}]
Wasn't sure if you meant between 1 and 5 or only integers
 
@MichaelHale Thanks. It's the _? that I was missing; I was trying to use {x_,y_}/; ... The MemberQ will work nicely since the numbers I'm looking for don't always fit in a nice range
 
@bobthechemist Also Select[data, 1 <= #[[1]] <= 5 &]
 
@bobthechemist Yeah, I tend to use Cases when most of the filtering involves the structure of the expressions, and Select when most of the filtering involves function evaluations on the expressions.
 
@R.M. I always forget Select.
 
5:53 PM
posted on February 05, 2016 by Brian Wood

“What are the odds?” This phrase is often tossed around to point out seemingly coincidental occurrences, and it’s normally intended as a rhetorical question. Most people won’t even wager a guess; they know that the implied answer is usually “very slim.” However, I always find myself fascinated by this question. I like to think about [...]

 
6:06 PM
@MichaelE2 Thanks for your respond. What you said in (3) is exactly what I want. Does Mathematica has a specific command or code for (3) or I should write my own code? Also, I search on literature and I found that least squares is the the methode that I can use for Nonlinear Overdetermined system of equations. Please give me idea if you can. Thanks
 
 
3 hours later…
8:56 PM
Hey all-Quick question: I have an array.. {{x,y},{x1,y1}....}
How do I perform a function on just the y, y1... etc ? (i.e. multiple by some value?)
 
@e3labs For example func[Last[Transpose[array]]].
Or, because it is not exactly clear what you want, when you want to apply a function on each y1, y2, ... and return the same array {{x1, f[y1]},{x2,f[y2]}, ...} then you can use
{#1, f[#2]} & @@@ {{x1, y1}, {x2, y2}, {x3, y3}}
 
Yess-- Good point. Didn't specify the output
That's right though, I want {{x1, f[y1]},{x2,f[y2]}
Thanks a lot!
 
 
2 hours later…
10:46 PM
0
Q: How do I change my review vote?

EdmundI selected the wrong button when reviewing this question. I did not see a way to undo my mistake. Is this possible?

 
 
1 hour later…
11:59 PM
@Emad Something like sols0 = Solve[{eqn2, eqn3, eqn4, eqn5, eqn6, eqn1},...]; sols = Select[sols, eqn11 < 10^-8 /. Equal -> Subtract /. #&]. One can try NSolve instead of Solve, too; but some systems of equations can't be solved, and it may be more complicated than this. The tolerance 10^-8 can be adjusted to suit.
 

« first day (1479 days earlier)      last day (3002 days later) »