Community RSS Feed
https://community.wolfram.com
RSS Feed for Wolfram Community showing any discussions in tag Mathematics sorted by activePadding a vector using Insert[ ]?
https://community.wolfram.com/groups/-/m/t/2213126
Hello,
I am looking for some help with the INSERT command in Mathematica.
I have a 4 x1 column vector
![enter image description here][1]
In which i have inserted 4 additional rows of zeros at the top, thus making it a (8 x 1) column vector.
![enter image description here][2]
![enter image description here][3]
If you notice that the original terms that now occupy the 5h, 6th, 7th & 8th values, are now enclosed in braces { }.
So it seems that the new 8 x 1 column vector is cannot be multiplied with a 8 x 8 matrix, which I was trying to do and resulted in this error.
I get this message
![enter image description here][4]
Would you know what the issue is with the INSERT command in my case?
Thanks
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1.png&userId=2213110
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=2.png&userId=2213110
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=3.png&userId=2213110
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=4.png&userId=2213110Aslam Kittur2021-03-08T10:13:57ZSeries limit with free parameter
https://community.wolfram.com/groups/-/m/t/2211904
Hello!
I am totally new to this. So, I am trying to input how to get the limit of a series with a parameter, ie like
$ a_n = \sqrt{(kn+2)} + \sqrt{(n)} , ~~k \in (0,+\infty )$Al Kas2021-03-06T18:00:43ZDifferent result from Integrate and NIntegrate?
https://community.wolfram.com/groups/-/m/t/2212477
Hello everyone,
I am trying to acquire the solution (A) to an integral and subsequently numerically integrate Exp[-A]. However, I get a different answer depending on whether I solve for A analytically or numerically. I am hoping to find a way to solve for A numerically but get the same numerical solution to Exp[-A] as I would if I solved for A analytically. Is this possible?Alex L2021-03-07T21:13:07ZFind Eigenvalues in differential equation?
https://community.wolfram.com/groups/-/m/t/2212649
Hi everyone!
I'm trying to find the eigenvalues for a particular equation. I already have the answer, but I want to find it through Mathematica.
![enter image description here][1]
I tried with the following code:
eqy = Y''[y] + \[Beta]^2*Y[y] == 0;
sol = DSolve[{eqy}, Y[y], {y, 0, W}]
and I get the proper result, but I don't know how to find the eigenvalues. I tried with NDEigenvalues but it doesn't work properly:
NDEigenvalues[eqy, Y[y], {y, 0, W}, 1]
Can you perhaps give me some suggestions?
Thank you in advance!
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=1516Cattura.JPG&userId=2211476Roberta Mongillo2021-03-08T10:40:15ZFind these Transcendental equation's solution?
https://community.wolfram.com/groups/-/m/t/875546
Hi, I'm trying to find out the solution of this trigonometric solution but i'm not able to. I'm looking for your help and advise. Regards
![enter image description here][1]
[1]: http://community.wolfram.com//c/portal/getImageAttachment?filename=trig1.png&userId=452056Muhammad Afzal2016-06-21T09:34:43ZLoop solving an equation?
https://community.wolfram.com/groups/-/m/t/2212018
I want to solve for the variable sigma for all values of Np. Please Help
ClearAll["Gloabal`*"];
Np = {2100, 4900, 26600, 21000};
a0 = 10^-6;
af = 12 10^-6;
c = 3.41 10^-11;
m = 2.43;
f = (1 + 3 a0/af)/((2 \[Sqrt](Pi a0/af)) (1 - (a0/af))^(3/2));
Do[Solve[(a0^(-m/2 + 1) - af^(-m/2 + 1))/((m/2 - 1) c f^m \[Sigma]^
m Pi^(m/2)) == Np[[i]], \[Sigma]], {i, 1, 4, 1}]KRISHAN SHARMA2021-03-07T10:18:16ZPrinting outputs for Collatz conjecture?
https://community.wolfram.com/groups/-/m/t/2210697
Hi, all. I just found this Collatz conjecture:
Choose a number. If the number is even, divide it by two and repeat the process.
If the number is odd, multiply the number by three and add 1. Then divide the number by two.
It is conjectured this leads to an infinite loop with the last three numbers in the list of outputs being 4, 2, 1.
I'm trying to make a loop that prints the outputs and stops I after the three terms 4, 2, 1 are printed in order.
I think I need to include pattern matching code to stop the loop after 4, 2, 1 are printed in order.
![Collatz][1]
Thank you.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=CollatzCodeImage.png&userId=1293267Jonathan Bell2021-03-06T04:10:27ZPassing a numerical solution of an integral to NIntegrate?
https://community.wolfram.com/groups/-/m/t/2211626
Hello everyone,
I am trying to integrate one function (integrand A) and subsequently use that result as part of the integrand (integrand B) for another integral that is to be numerically solved. When I integrate function A analytically, I achieve my goal no problem. But, when I try to numerically integrate function A and subsequently use that solution in the second integral, my numerical solution is wrong. I was wondering if someone could help me make the second approach (the fully numerical approach) work? Attached is my code and further explanation of the problem.
AlexAlex L2021-03-06T16:15:08ZWhere are notebooks for "Classical Mechanics with Mathematica", 2nd ed?
https://community.wolfram.com/groups/-/m/t/1419748
I just got the new book ""Classical Mechanics with Mathematica", 2nd ed, by Romano and Marasco. The preface refers to available Mathematica notebooks, the cover includes a box "EXTRAS ONLINE".
Where are those notebooks found?
So far as I can see, there is no indication in the books' preface, colophon, etc., as to the notenooks' loccation. And the page for the book at the publisher's website, https://www.springer.com/us/book/9783319775944, seems to have no link whatsoever to such notebooks. (The "Downloads" link there has as target an external site giving metrics on downloads of the ebook and individual chapters of it.)
In face, as I have begun to read the book, I have not yet found any mention of Mathematica, not even in exercises in the "Mechanics" part of the book, where the preface alleges that exercises using Mathematica may be found.Murray Eisenberg2018-08-22T21:57:28ZSeries with ArcTan gives wrong answer with Wolfram Language!
https://community.wolfram.com/groups/-/m/t/2209736
Hi!
Recently, I have found a very bad problem with Wolfram Language. It gives the wrong answer for a quite simple expression!
When calculating
`Series[ArcTan[A + 1/x], {x, 0, 2}, Assumptions -> A > 0 && x > 0]`
Wolfram Language returns the wrong answer (tested in Wolfram cloud and in Mathematica 12.1.1.0)
![enter image description here][1]
I am absolutely sure that the correct answer should be
![enter image description here][2]
(I have a Ph.D. degree and teach for many years.)
There is a plot of all three functions to demonstrate the issue
![enter image description here][3]
How to get rid of the problem?
(Attached the notebook with corresponding calculations.)
**UPD** It is a bug. More obvious issue
![enter image description here][4]
**UPD#2** Working around.
The result in v10.3 is correct.
The result in v11.3 is incorrect.
The [corresponding post][5] is in Mathematica Stackexchange.
[1]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotat2021-03-0417-53-25.png&userId=2209721
[2]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotat2021-03-0417-54-33.png&userId=2209721
[3]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotat2021-03-0417-57-32.png&userId=2209721
[4]: https://community.wolfram.com//c/portal/getImageAttachment?filename=Screenshotat2021-03-0422-07-07.png&userId=2209721
[5]: https://mathematica.stackexchange.com/questions/241081/series-with-arctan-gives-wrong-symbolic-answer-in-wolfram-languageStanislav Apostolov2021-03-04T16:05:34ZSolving wave equation with spherical coordinates using NDSolveValue?
https://community.wolfram.com/groups/-/m/t/2203903
I am trying to use NDSolveValue for a fairly simple setup (used for testing that I understand NDSolveValue which apparently I don't). I have a wave equation (for a vector potential) where I use a plane wave propagating in the -x direction as initial conditions. It works fine in Cartesian coordinates where I only need to solve for 1 function. But if I switch to spherical coordinates where I have two functions (the r and phi components of the vector potential) then the solution is no longer correct. I wonder if it is because I am not extracting the results from NDSolveValue correctly; if I compare the initial conditions that are used by NDSolveValue then these do not correspond to the "solution" I get out at the initial time. So I am wondering if anyone might have an idea as to what is going wrong - am I for instance extracting the output from NDSolveValue incorrectly? The notebook code is shown below.
In[1]:= Needs["DifferentialEquations`InterpolatingFunctionAnatomy`"]
eqr = -r r D[Ar[t, r, phi], t, t] +
r r D[Ar[t, r, phi], r, r] + D[Ar[t, r, phi], phi, phi] +
2 r D[Ar[t, r, phi], r] - 2 r D[Aphi[t, r, phi], phi] -
2 Ar[t, r, phi] == 0
eqphi = -r r r D[Aphi[t, r, phi], t, t] +
r r r D[Aphi[t, r, phi], r, r] + D[Aphi[t, r, phi], phi, phi] r +
4 r r D[Aphi[t, r, phi], r] + r Aphi[t, r, phi] +
2 D[Ar[t, r, phi], phi] == 0
a[r_, phi_] := 1
omega := 0.2
Aric =
Ar[t, r, phi] == a[r, phi] Sin[phi] Cos[omega (r Cos[phi] + t)]
Aphiic =
Aphi[t, r, phi] == a[r, phi] Cos[phi] Cos[omega (r Cos[phi] + t)]/r
{Arsol, Aphisol} =
NDSolveValue[{eqr, eqphi,
DirichletCondition[{Aric, Aphiic}, t == 0]}, {Ar, Aphi}, {t, 0,
100}, {r, 0.001, Sqrt[2] 100}, {phi, 0, 2 Pi}, AccuracyGoal -> 24,
PrecisionGoal -> 10]
For any rvalue and phivalue in the intervals [0.001,Sqrt[2] 100] and [0, 2 Pi] I would expect that Arsol[0,rvalue,phivalue] and Aphisol[0,rvalue,phivalue] should be equal to the expressions indicated in Aric and Aphiic evaluated at those same rvalue, phivalue. But they are not. Why?Sofie Koksbang2021-02-25T08:51:24Z