I need to plot this expression

ϕ(s;H,B)=(∫s01+B sin2H t√1+B2+2Bsin2H tdt, 12H√1+B2+2Bsin2H s) \phi(s; H,B)=\left(\int_{0}^{s}\frac{1+B\ \sin2H\ t}{\sqrt{1+B^2+2B\sin2H\ t}} \text{d} t,\ \frac{1}{2H}\sqrt{1+B^2+2B\sin2H\ s}\right)

for H=0.5H=0.5, B=0,0.5,1,1.5B=0, 0.5, 1, 1.5, but I don’t know how to write Mathematica code because I have never worked in Mathematica before.Thank you for your help.

=================

=================

2 Answers

2

=================

I do not know what range of ss you had in mind, so I arbitrarily chose one below. You should be able to change it at will.

This is an example in hopes that you will study this further and get to the point where you can come up with such code yourself. Please take a look at the excellent links provided by Arnoud as well to get you started.

Clear[phi]

phi[s_?NumericQ, h_, b_] :=

{

NIntegrate[(1 + b Sin[2 h t])/Sqrt[1 + b^2 + 2 b Sin[2 h t]], {t, 0, s}],

1/(2 h) Sqrt[1 + b^2 + 2 b Sin[2 h s]]

}

Table[

ParametricPlot[phi[s, 0.5, b], {s, 0, 15}, AspectRatio -> 1/GoldenRatio],

{b, {0, 0.5, 1, 1.5}}

]

This is your function:

phi[s_, H_, B_] :=

NIntegrate[(1 + B Sin[2 H t])/Sqrt[

1 + B^2 + 2 B Sin[2 H t]], {t, 0, s}] 1/(2 H) Sqrt[

1 + B^2 + 2 B Sin[2 H s]]

But if you want to plot it you have to give the value for s.

Plot[{phi[s, 0.5, 1], phi[s, 1, 1], phi[s, 1.5, 1], phi[s, 2, 1]}, {s, 0, 16}]

1

Fabian, I understood the OP’s equations to be defining a point with (x,y)(x,y) coordinates, rather than being the product of two factors.

– MarcoB

Aug 10 ’15 at 14:50

Oh yes that is also possible. 😉

– Fabian

Aug 10 ’15 at 14:54