mahdi1625

10 Reputation

4 Badges

12 years, 77 days

MaplePrimes Activity


These are questions asked by mahdi1625

How can I find all roots of sin(sqrt(x)) as the search interval is not constant and depens on x for this function?

I want to stop the following loop when there is no more roots. how can i do this?

 

 

How can I find period of the following function with respect to p?
 

 

Thanks,

I am trying to estimate psi and gamma from the following root finding Eqs. How can I do this?

It should be noted that paramaters other than psi and gamma are assumed to be specified.


#DeHoog f4(t)

F4 := proc (F::procedure, Tol, M, t) local T, gamma1, Fc, e, q, d, A, B, i, r, m, n, h2M, R2M, A2M, B2M, a, z; T := evalf(2*t); gamma1 := evalf((-1)*.5*ln(Tol)/T); Fc := Array(0 .. 2*M); e := Array(0 .. 2*M, 0 .. 2*M); q := Array(0 .. 2*M, 0 .. 2*M); d := Array(0 .. 2*M); A := Array(-1 .. 2*M); B := Array(-1 .. 2*M); Fc[0] := evalf(.5*F(gamma1)); for i to 2*M do a := gamma1+I*i*Pi/T; Fc[i] := evalf(F(a), 25) end do; for i from 0 to 2*M do e[0, i] := 0 end do; for i from 0 to 2*M-1 do q[1, i] := evalf(Fc[i+1]/Fc[i]) end do; for r to M do for i from 2*M-2*r+1 by -1 to 0 do if 1 < r then q[r, i] := evalf(q[r-1, i+1]*e[r-1, i+1]/e[r-1, i]) end if; if i < 2*M-2*r+1 then e[r, i] := evalf(q[r, i+1]-q[r, i]+e[r-1, i+1]) end if end do end do; d[0] := Fc[0]; for m to M do d[2*m-1] := -q[m, 0]; d[2*m] := -e[m, 0] end do; z := evalf(exp(I*Pi*t/T)); A[-1] := 0; B[-1] := 1; A[0] := d[0]; B[0] := 1; for n to 2*M do A[n] := A[n-1]+d[n]*z*A[n-2]; B[n] := B[n-1]+d[n]*z*B[n-2] end do; h2M := evalf(.5+((1/2)*d[2*M-1]-(1/2)*d[2*M])*z); R2M := evalf(-h2M-h2M*sqrt(1+d[2*M]*z/h2M^2)); A2M := A[2*M-1]+R2M*A[2*M-2]; B2M := B[2*M-1]+R2M*B[2*M-2]; evalf(exp(gamma1*t)*Re(A2M/B2M)/T) end proc;

proc (F::procedure, Tol, M, t) local T, gamma1, Fc, e, q, d, A, B, i, r, m, n, h2M, R2M, A2M, B2M, a, z; T := evalf(2*t); gamma1 := evalf((-1)*.5*ln(Tol)/T); Fc := Array(0 .. 2*M); e := Array(0 .. 2*M, 0 .. 2*M); q := Array(0 .. 2*M, 0 .. 2*M); d := Array(0 .. 2*M); A := Array(-1 .. 2*M); B := Array(-1 .. 2*M); Fc[0] := evalf(.5*F(gamma1)); for i to 2*M do a := gamma1+I*i*Pi/T; Fc[i] := evalf(F(a), 25) end do; for i from 0 to 2*M do e[0, i] := 0 end do; for i from 0 to 2*M-1 do q[1, i] := evalf(Fc[i+1]/Fc[i]) end do; for r to M do for i from 2*M-2*r+1 by -1 to 0 do if 1 < r then q[r, i] := evalf(q[r-1, i+1]*e[r-1, i+1]/e[r-1, i]) end if; if i < 2*M-2*r+1 then e[r, i] := evalf(q[r, i+1]-q[r, i]+e[r-1, i+1]) end if end do end do; d[0] := Fc[0]; for m to M do d[2*m-1] := -q[m, 0]; d[2*m] := -e[m, 0] end do; z := evalf(exp(I*Pi*t/T)); A[-1] := 0; B[-1] := 1; A[0] := d[0]; B[0] := 1; for n to 2*M do A[n] := A[n-1]+d[n]*z*A[n-2]; B[n] := B[n-1]+d[n]*z*B[n-2] end do; h2M := evalf(.5+((1/2)*d[2*M-1]-(1/2)*d[2*M])*z); R2M := evalf(-h2M-h2M*sqrt(1+d[2*M]*z/h2M^2)); A2M := A[2*M-1]+R2M*A[2*M-2]; B2M := B[2*M-1]+R2M*B[2*M-2]; evalf(exp(gamma1*t)*Re(A2M/B2M)/T) end proc

(1)

F4(proc (p) options operator, arrow; int(12*Dirac(a)*BesselJ(0, 2*a)/(a*p), a = 0 .. .100) end proc, 0.1e-4, 4, 10);

Float(undefined)

(2)

``

``


Download dehoog.mw

How is it possible to numerically integrate the function containing Diract delta function.

The following code for example is failed to answer and makes computer memory full.

 

1 2 3 Page 1 of 3