Community RSS Feed
http://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Equation Solving sorted by activeFind Intersection Points of Lines using ListPlot
http://community.wolfram.com/groups/-/m/t/1242003
Hello, I am trying to find the intersection points of the two horizontal solid lined with the dashed line. I would like to label each point as for example point a and the second point as b. I would also like to display the value of the intersecting point. Note that I am aiming to find the x value of the intersecting point since I know y. I find it easier with function and using Plot function. I tried with this one but it didn't work.
Thank you
list1 = {0, 1};
list2 = {0, 5};
ListLinePlot[Transpose[{list1, list2}], PlotStyle -> {Thick, Dashed},
PlotRange -> {{0, 5}, {0, 5}},
GridLines -> {None, {{2, {Black, Thick}}, {4, {Green, Thick}}}}]Joeseph A2017-12-08T18:27:16ZProblem: Light transport through biological tissue
http://community.wolfram.com/groups/-/m/t/1241248
I'm new to Mathematica and while it seems like there should be a way to do this (it is effectively simultaneous equations) I don't know how to input it to Mathematica. I've tried using solve and setting it in a table first but it seems I'm not realizing something or missing something in the documentation about how to play with a few.
The problem represents light passing through tissue. There are two variables in the equation that I need to know, a and b. (if there is a method to input equations/code here can someone point it out to me?)
![enter image description here][1]
I(lam), I0(lam) are measured values. I will know these, they are the intensity of the light coming out and going into the volume at wavelength lambda. M(lam) is the absorption of tissue at the wavelength lamda, this I will also know at all lambdas.
d thickness of the tissue, this is a set value.
a and b are what I would like to know. That term represents the light scattering function for the tissue.
What I would like mathematica to do is tell me how many lambda's, or colors of light, do I have to measure at to find what a and b are, and the equation that gives me a and b.
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=KsqisKw.png&userId=20103Alan Riordan2017-12-07T12:03:56ZOne simple equation gets answer, similar one does not.
http://community.wolfram.com/groups/-/m/t/1241519
In Mathematica 11.2, when I try
Solve[{x + y == 12, y == 2 x}, {x}]
I get
{{x -> 4}}
Looks good. But, if I do
Solve[{x + y == 25, y == 4 x}, {x}]
I get
{{ }}
?Anthony Torrero Collins2017-12-08T05:04:11ZSubsequent Calculations Causes Lost Prior Calculations in Notebook
http://community.wolfram.com/groups/-/m/t/1241366
It seems that the only way that I can calculate the attached notebook is by first going into "Evaluate" and then selecting "Quit Kernel" then selecting "Local" and finally press the "Enter" key on my number pad. If I later press the "Enter" key on my number pad, while in the notebook, I loose my evaluations and then need to through the "Evaluate" and then selecting "Quit Kernel" procedure again.
It appears that the first top down calculation works fine, but any additional calculations really seems to mess the notebook up. Additionally, I am getting a "Set::write: Tag Function in (0&)[0.000263158] is Protected" message as well.
Could someone please tell me what I am doing wrong.
Thanks,Mitchell Sandlin2017-12-07T19:14:34ZProblem with solving a system of equations
http://community.wolfram.com/groups/-/m/t/1241479
I need to solve this apparently simple system of equations in Mathematica, but it gives me an error message, that Equations may not give solutions for all "solve" variables. The command is
sol = Solve[{x1 == x A1/(x A1 + y A3), x2 == x A2/(x A2 + y A4),
x3 == y A3/(x A1 + y A3), x4 == y A4/(x A2 + y A4),
x1 + x2 + x3 + x4 == 2, x + y == 1}, {x1, x2, x3, x4, x, y}]
Any help is appreciated.Alex Token2017-12-08T08:28:45ZHow to join solutions to the Scrödinger Equation for a barrier potential
http://community.wolfram.com/groups/-/m/t/1240280
My first post was deleted, because I asked for help without demonstrating what I had done myself first. Since this group is not about censorship nor high entry barriers to Mathematica, I will refrain from commenting on that, and just hope this post meet the criteria.
I want to obtain the the solutions to the time independent Schrödinger Equation for a barrier potential. I have created three equations:
tise1 = -\[HBar]^2/2 m D[\[Psi]1[x], {x, 2}] == e0 \[Psi]1[x]
tise2 = -\[HBar]^2/2 m D[\[Psi]2[x], {x, 2}] == (e0 - v0) \[Psi]2[x]
tise3 = -\[HBar]^2/2 m D[\[Psi]3[x], {x, 2}] == e0 \[Psi]3[x]
and the boundary conditions
bc = {\[Psi]1[0] == \[Psi]2[0], \[Psi]2[a] == \[Psi]3[a],
D[\[Psi]1[x], x] == D[\[Psi]2[x], x] /. x -> 0,
D[\[Psi]2[x], x] == D[\[Psi]3[x], x] /. x -> a}; ic = {}
(I intended to use ic to remove "left moving" waves right of the potential (x>a), but I could no figure out how to do this)
Next I used
sol = DSolve[
Join[{tise1, tise2, tise3}, bc, ic], {\[Psi]1, \[Psi]2, \[Psi]3},
x]
But the results are overwhelming and as far as I can tell: wrong. I would like to be able to get the wave function as an piecewise concatenation of psi 1-3 to add the time development and to calculate transmission and reflection rates.
Hopefully this makes sense. Any help (or pointers to such) will be appreciated.
/Mogensjallberg2017-12-05T22:01:45ZSolutions to the gauged GL vortices in (1+1) dimensions
http://community.wolfram.com/groups/-/m/t/1240500
I am trying to numerically solve the following differential equations for the profiles of the Gauged GL Vortices:
eqn1 = y''[x] + y'[x]/x - ((k - z[x])^2* y[x])/x^2 + ((1 - y[x]^2)*y[x])/2 == 0;
eqn2 = z''[x] - z'[x]/x + (k - z[x])*y[x]^2 == 0;
with the boundary conditions:
inf = 1000;
bc = {y[0] == 0, y[inf] == 1, z[0] == 0, z[inf] == 1};
I have tried a finite difference method but this seems to give large errors even for k = 1 so I am wondering if there is a better numerical method to yield a more accurate solution?
Below is my current function which I employ to solve these coupled differential equations:
Clear[fdd, pdetoode, tooderule, sollst]
fdd[{}, grid_, value_, order_] := value;
fdd[a__] := NDSolve`FiniteDifferenceDerivative@a;
pdetoode[funcvalue_List, rest__] :=
pdetoode[(Alternatives @@ Head /@ funcvalue) @@ funcvalue[[1]],
rest];
pdetoode[{func__}[var__], rest__] :=
pdetoode[Alternatives[func][var], rest];
pdetoode[rest__, grid_?VectorQ, o_Integer] :=
pdetoode[rest, {grid}, o];
pdetoode[func_[var__], time_, {grid : {__} ..}, o_Integer] :=
With[{pos = Position[{var}, time][[1, 1]]},
With[{bound = #[[{1, -1}]] & /@ {grid},
pat = Repeated[_, {pos - 1}],
spacevar = Alternatives @@ Delete[{var}, pos]},
With[{coordtoindex =
Function[coord,
MapThread[
Piecewise[{{1, # === #2[[1]]}, {-1, # === #2[[-1]]}},
All] &, {coord, bound}]]},
tooderule@
Flatten@{((u : func) |
Derivative[dx1 : pat, dt_, dx2___][(u : func)])[x1 : pat,
t_, x2___] :> (Sow@coordtoindex@{x1, x2};
fdd[{dx1, dx2}, {grid},
Outer[Derivative[dt][u@##]@t &, grid],
"DifferenceOrder" -> o]),
inde : spacevar :>
With[{i = Position[spacevar, inde][[1, 1]]},
Outer[Slot@i &, grid]]}]]];
tooderule[rule_][pde_List] := tooderule[rule] /@ pde;
tooderule[rule_]@Equal[a_, b_] :=
Equal[tooderule[rule][a - b], 0] //.
eqn : HoldPattern@Equal[_, _] :> Thread@eqn;
tooderule[rule_][expr_] := #[[Sequence @@ #2[[1, 1]]]] & @@
Reap[expr /. rule]
Clear@pdetoae;
pdetoae[funcvalue_List, rest__] :=
pdetoae[(Alternatives @@ Head /@ funcvalue) @@ funcvalue[[1]], rest];
pdetoae[{func__}[var__], rest__] :=
pdetoae[Alternatives[func][var], rest];
pdetoae[func_[var__], rest__] :=
Module[{t},
Function[pde, #[
pde /. {Derivative[d__][u : func][inde__] :>
Derivative[d, 0][u][inde, t], (u : func)[inde__] :>
u[inde, t]}] /. (u : func)[i__][t] :> u[i]] &@
pdetoode[func[var, t], t, rest]]Benjamin Leather2017-12-06T11:13:47ZSolve equations in the package GaloisField?
http://community.wolfram.com/groups/-/m/t/1235215
Hi all, i'm new here and i need help, i'm working with the package GaloisField and over field GF[2^m] with m>1. What i really need is to know wich x, y in GF[8], for example, satisfies the equation x^2+xy^ay^2=b, where a and b are choosen elements of the field. Or i need to solve at least the equation x^2+cx+a=b, with c,a,b in the field..
I was able to solve x^2+a=b and ax+c=b, but when i put the equation x^2+cx+a=b it doesn't work.. anyone can help me please? Thanks
In[55]:= Solve[x^2 + F8[2] == F8[4], x]
Out[55]= {{x -> F8[5]}, {x -> F8[5]}}
In[56]:= Solve[x*F8[2] + F8[3] == F8[5], x]
Out[56]= {{x -> F8[3]}}
In[57]:= Solve[x^2 + x*F8[2] + F8[4] == F8[7], x]
Out[57]= {{x -> 0}, {x -> 0}}maycow carneiro2017-11-29T14:05:51ZSolve mixed power and exponential algebraic equation?
http://community.wolfram.com/groups/-/m/t/1237075
Hello, I wanted to solve the function:
> 9^(3 x) - 12 x^x + 45 x^3 - 66 = 0
wolfram alpha gave to answers: 726.5.11... and 0.6... only one of them is true, this can be checked by using Newton raphson method to find al the roots, according to newton's method, no matter what value I choose it convergences to 0.6, I believe that is the way and the only possible way wolfram can solve such equations, and one of the numerical methods
for unknown reason convergence to 726...max ron2017-12-02T19:44:08ZPlot the Poincare surface of section for the Henon-Heiles System?
http://community.wolfram.com/groups/-/m/t/1236049
Hi, first to mention I´m an absolute beginner with Mathematica...
My problem is now, that I have to plot the Poincare Surface of Section for the Henon-Heiles System as an exercise in Nonlinear Physics/Chaos.
I´m absolutely new to numerics, so I started the Mathematica trial to get into it. Now I´m at this point
abc = {x''[t] + x[t] + 2*x[t]*y[t] == 0, y''[t] + y[t] + y[t]^2 + x[t]^2 == 0};
to define my differential equations
psect[{x0_, y0_, a0_, b0_}] :=
Reap[NDSolve[{abc, x[0] == x0, y[0] == y0, x '[0] == a0, y'[0] == b0,
WhenEvent[x[t] == 0, Sow[y[t]]]}, {}, {t, 0, 1000},
MaxSteps -> \[Infinity]]][[-1, 1]]
here is the critical point ... because if i want to apply the following
abcdata = Map[psect, {
{0, 0.9952906114885919, 1, 1}, {0, 2.1257099470901704, 1, 1},
{0, 4.939152797323216, 1, 1}, {0, 4.926744120488727, 1, 1},
{0, 1.7074633238173198, 1, 1}, {0, 4.170087631574883, 1, 1},
{0, 2.3736566160602277, 1, 1}, {0, 1.4987884558838156, 1, 1},
{0, 1.3745418575363608, 1, 1}, {0, 1.3039536044289253, 1, 1},
{0, 2.289597511313432, 1, 1}, {0, 4.306922133429981, 1, 1},
{0, 5.000045498132029, 1, 1}}];
ListPlot[abcdata, ImageSize -> Medium]
i alwas get the Problem that there are only 3 initial conditions, while 4 are needed... but this is something weird, since I can´t find what´s wrong in my system... maybe everything, maybe a small thing.
Those are the problems that occur:
NDSolve::ndnco: The number of constraints (3) (initial conditions) is not equal to the total differential order of the system plus the number of discrete variables (4)., Part::partw: Part 1 of {} does not exist., General::stop: Further output of NDSolve::ndnco will be suppressed during this calculation., General::stop: Further output of Part::partw will be suppressed during this calculation.
I´ve almost lost hope... since I´m not able to learn all that general stuff in few days I used http://reference.wolfram.com/language/example/PoincareSections.html as reference and tried to put it into my system... so far it didn´t work.
I would be really thankful if anyone has any kind of idea...Dominik Vierl2017-12-01T11:17:13ZReplace some terms in an expression by an abbreviation?
http://community.wolfram.com/groups/-/m/t/1224451
I have a symbolic expression (don't ask why, that doesn't matter), say:
exp1 = 2 n (r + h) Sin[\[Pi]/n]
Since I know, that n*Sin[\[Pi]/n] is something special (namely \[Pi] for large n), I want to replace that terms by an abbreviation pn:
pn = n Sin[\[Pi]/n]
and get something like exp2 from exp1 using that abbreviation. I.e.:
exp2 = 2 (r+h) pn
I tried several things like Replace, Reduce, Evaluate and the like, but could get no reasonable result. Does anybody know, how to do that kind of things?Werner Geiger2017-11-18T19:22:14Z