Solving Freidman Equation on MATLAB

  • Thread starter Thread starter WoC1994
  • Start date Start date
  • Tags Tags
    Matlab
WoC1994
Messages
1
Reaction score
0
Homework Statement
I have to solve the Freidman Equation in a MATLAB live script (with adjustable sliders).
Relevant Equations
The Freidman Equation
I have to use MATLAB to solve the Freidman Equation and I have barely any computer programming language skills whatsoever. Is there anyone that can please help me solve the equation using MATLAB. I desperately need help in this area because my Professor won't show me how like he expects me to just know this computer programming stuff already with barely any prior experience. I've tried multiple tutorials already and I still don't get it. Please help!

This is the equation he wants me to work with.
1649618778729.png


1649618814389.png

1649618834935.png
 
Physics news on Phys.org
Welcome to PF!

Sadly we cannot write your program for you. MATLAB is not a hard language to program in but of course its hard to learn if you've never studied any languages before.

One other thing I need to point out is that you need to show what you've done in your case posting your code and where you are stuck. We can provide hints or code snippets but its up to you to integrate our hints together and make it work. We can't write it or debug it for you but we can tell you how to do those things.

Perhaps if you try programming a simpler problem it would help get you going. The task you attempting to do is known as numerical integration. MATLAB has functions that can do those kinds of tasks if you provide the proper input values in a way analogous to doing the work by hand.

https://www.mathworks.com/help/matlab/numerical-integration-and-differential-equations.html

We did have a similar question years ago (see thread below) with some code that might get you thinking how it might be done.

https://www.physicsforums.com/threads/matlab-friedmann-equations-help.249975/

and there's a website discussing how it could be done:

https://dournac.org/info/friedmann

My suggestion though is to study the examples and see how you can write your own as internet solutions may not do what you're looking for.
 
Last edited:
  • Like
Likes PhDeezNutz and berkeman
##|\Psi|^2=\frac{1}{\sqrt{\pi b^2}}\exp(\frac{-(x-x_0)^2}{b^2}).## ##\braket{x}=\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dx\,x\exp(-\frac{(x-x_0)^2}{b^2}).## ##y=x-x_0 \quad x=y+x_0 \quad dy=dx.## The boundaries remain infinite, I believe. ##\frac{1}{\sqrt{\pi b^2}}\int_{-\infty}^{\infty}dy(y+x_0)\exp(\frac{-y^2}{b^2}).## ##\frac{2}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,y\exp(\frac{-y^2}{b^2})+\frac{2x_0}{\sqrt{\pi b^2}}\int_0^{\infty}dy\,\exp(-\frac{y^2}{b^2}).## I then resolved the two...
Hello everyone, I’m considering a point charge q that oscillates harmonically about the origin along the z-axis, e.g. $$z_{q}(t)= A\sin(wt)$$ In a strongly simplified / quasi-instantaneous approximation I ignore retardation and take the electric field at the position ##r=(x,y,z)## simply to be the “Coulomb field at the charge’s instantaneous position”: $$E(r,t)=\frac{q}{4\pi\varepsilon_{0}}\frac{r-r_{q}(t)}{||r-r_{q}(t)||^{3}}$$ with $$r_{q}(t)=(0,0,z_{q}(t))$$ (I’m aware this isn’t...
Hi, I had an exam and I completely messed up a problem. Especially one part which was necessary for the rest of the problem. Basically, I have a wormhole metric: $$(ds)^2 = -(dt)^2 + (dr)^2 + (r^2 + b^2)( (d\theta)^2 + sin^2 \theta (d\phi)^2 )$$ Where ##b=1## with an orbit only in the equatorial plane. We also know from the question that the orbit must satisfy this relationship: $$\varepsilon = \frac{1}{2} (\frac{dr}{d\tau})^2 + V_{eff}(r)$$ Ultimately, I was tasked to find the initial...
Back
Top