Items tagged with approximation

Feed

hi my friend. i want to find a approximately function of this plot. how i can get this. and i have numerical value in this excel

Book1.xlsx

 

I want to approximate the following hypergeometric function for large values of Y. The variables c and R are complex parameters.

hypergeom([-I*(c+sqrt(c^2-1)), I*(-c+sqrt(c^2-1))], [-I*(2*c+I), -I*(c+I+I*c/R)], exp(Y)*c/R)

 

I allready tried asympt(f,Y), but maple failed.

Hello;

I need some help to compute the series approximation of the modulus and argument of hankel function for large x. The code display

 Error, (in asympt) unable to compute series

Thanks  for helping me.

#We define the hankel function as
#HankelH1(v,x) = BesselJ(v,x) + I*BesselY(v,x), where BesselJ and BesselY are bessel function.
#In this question the parameter "v " is  fixed. "

# Code

restart:
with(MTM):
HankelH1(v, x);
# The modulus of Hankel function
Mn:=x->abs(HankelH1(v, x));
thetan:=x->argument(HankelH1(v, x));
phin:=x->argument(diff(HankelH1(v, x),x));
dervthetan:=x->diff(thetan(x),x);
dervphin:=x->diff(phin(x),x);
# Compute series
series(thetan(x),x=infinity,7);
series(phin(x),x=infinity,7);
series(Nn(x),x=infinity, 7);
series(Mn(x),x=infinity,7);
# I define the following function
f:=x->(Nm(x)/Mn(x))*exp(I*(phin(x)-thetan(x)));

# Series approximation
series(f(x),x=infinity, 7);



 

 

Dear all,

I need you help to finish some steps of this idea to approximate the roots of a given equation (polynom). Thanks in advance for your help. 

I have a sturm sequence, I would like to use Bisection method to approximation the roots using Sturm decomposition of my polynom. For example, my polynom is  P=x^6-4*x^3+x-2

s := sturmseq(x^6-4*x^3+x-2,x);

sturm(s,x,-2,2); # The number of roots in the interval (-2,2)

Here, i would like to find the roots in (-M,M) :

Bounding all roots in [-M,M] where M = max{1, sum^(n-1) |ai|/an}.

f0 = f, f1 = f', then use -remainder,

I know that  sturm(s,x,-M,M); gives the number of roots in (-M,M)  but is it possible to use the variation of sign like :

      gives a Sturm sequence for f.

      variation of sign, varsign(a0,a1,...,ar).

      Thm: (Sturm) varsign(f0(alpha),...,fr(alpha)) - varsign(f0(beta),..., fr(beta))

      is the number of distinct roots of f in [alpha,beta].

then i would like Isolating roots of rational polynomials

 

Method: reduce, remove rational roots, divide and conquer in [-M,M],

      then use bisection  in disjoint closed intervals ctg one root each

 Bisection method :

Bisection
      Setup: f(a) < 0, f(b) > 0 (or conversely).
      Repeated subdivision of [a,b] guaranteed to get close to a root.

      Error analysis: for error eps, solve (b-a)/ 2^(n+1)  < tol for n. where tol is the tolerance

Thanks

I want to solve numerically the PDE:

u_xx + u_yy= = u^{1/2}+(u_x)^2/(u)^{3/2}

 

My assumptions are that  |sqrt(2)u_x/u|<<1 (but I cannot neglect the first term since its in my first order approximation of another PDE.

 

So I tried solving by using pdsolve in maple, but to no cigar.

 

Here's the maple file:

 nonlinear.mw

PDE := diff(diff(u(x, y), x), x)+diff(diff(u(x, y), y), y) = u^(1/2)+(diff(u(x, y), x))^2/u^(3/2); IBC := {D[1](u)*(1, t) = 0, D[2](u)*(x, 1) = 0, u(0, t) = 1, u(x, 0) = 1}; pds := pdsolve(PDE, IBC, type = numeric); pds:-plot3d(t = 0 .. 1, x = 0 .. 1, axes = boxed, orientation = [-120, 40], color = [0, 0, u])

diff(diff(u(x, y), x), x)+diff(diff(u(x, y), y), y) = u^(1/2)+(diff(u(x, y), x))^2/u^(3/2)

 

{D[1](u)*(1, t) = 0, D[2](u)*(x, 1) = 0, u(0, t) = 1, u(x, 0) = 1}

 

Error, (in pdsolve/numeric/process_PDEs) all dependent variables in PDE must have dependencies explicitly declared, got {u}

 

Error, `pds` does not evaluate to a module

 

``

 

Download nonlinear.mw

Hi

I am trying to approximate a function in terms of piece-wise constant function:

 

$$f(x) = \sum_0^N c_iB_i(x)$$

 

what modules/packages of maple are helpful here? thanks

I wish to use closed Newton-Cotes with n=2, also known as Simpson's Rule to numerically integrate an improper integral.

 

If it matters the integrand is (cos(2x))/(x^1/3), integrating between x=0..1

I've tried a few different (but similar) code but to no avail. Here is some stuff I've tried:

 

1.

 

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp1 := ApproximateInt(cos(2*x)/x^(1/3), x = 0 .. 1, method = newtoncotes[2]);

 

This gives me an output message that says "Float(infinity)".

 

2.

with(Student[NumericalAnalysis]):

with(Student[Calculus 1]):

Simp2 := int(exp(-x)/sqrt(1-x), x = 0 .. 1);

 

This doesn't have Simpson's rule as an option.

 

I think I'm on the right track with my first try, since I guess it wasn't tecnically an error message, but I'm not sure how to alter the code accordingly to get a numerical value instead. Thanks for any help.

 

 

 

 

 

 

I am trying to numerically double integrate x^2+sqrt(y), with the bounds y=0..x and x=1..1.5.

Then I tried the following code:

 

int(int(x^2+sqrt(y),method=trapezoid,y=0..x),method=trapezoid,x=1..1.5);

 

I know how to write the code if instead of a 'x' in my upper limit for my integral, I had a real number, but I'm not sure how to remedy to code in order make it work. Any help would be appreciated. Thanks!

 

Is it possible to evaluate a function at multiple points described by an array or something of that sort and have Maple return the evaluations as an array. I need approximations of a function at various values of its argument so it would be nice to do it with a single command.

Thanks

After I've set my infolevel and used the ProjectionPlot command, is there any way to force Maple to display the information using exact values, instead of decimal approximations? See the attached file for the additional information.


with(Student[LinearAlgebra]):

infolevel[Student[LinearAlgebra]] := 1:

ProjectionPlot(`<,>`(-2, 3, 2), `<,>`(7, -3, -4))

 

``


Download projection_plot.mw

Hi all

I have a mathematical problem and I asked it in various sites but the answers till yet are not correct.

Assume that we have:

T[m]:=t->t^m:
b[n,m]:=unapply(piecewise(t>=(n-1)*tj/N and t<n*tj/N, T[m](N*t-(n-1)*tj), 0), t):

where n,N,tj are known constants. furthermore assume that we want to comute the following integral:

for following approximations:

I have written the following code but it seems to be incorrect:

V1:=Vector([seq(seq(b[n,m](t),m=0..1),n=1..3)]);
V:=evalf(V1.Transpose(V1));

the original program is :

taaylor.mws

I will be so grateful if any one can help me to solve it by maple

Mahmood   Dadkhah

Ph.D Candidate

Applied Mathematics Department

Hi, My goal is to compute the coefficient beta_i, so i will solve a system and get the coefficient beta_i. But my code return an error. Any help please. Many thinks

coef_approx:=proc(a,N,i,d)
local Fredholm,eq2,eq3,Vct_basis,fct,sys,eq4,M,w,b,M1,V,Vect_beta,h,x,phi,Kernel,lambda;
# Fredholm Integral equation
Fredholm:=phi(x)=f(x)+lambda*int(Kernel(x,y)*phi(y),y=-a..a);
# stepsize
h:=a/N;
# First Approximation of integral
eq2:=int(Kernel(x,y)*phi(y),y=-a..a)=sum(int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h),n=-N..N-d);
#Approximate the integral (Method used)
eq3:=phi->int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(beta[i]*phi((n+i-1)*h),i=1..d+1):
eq4:=int(Kernel(x,y)*phi(y),y=n*h..(n+d)*h)=add(alpha[i](n,m)*phi((n+i-1)*h),i=1..d+1);
# Fct used to compute the coeffcient beta[i]
Vct_basis:=[seq(x^i,i=0..d+1)]:
fct:=[seq(unapply(Vct_basis[i],x),i=1..d+2)];
# system of equation must be solved
sys:=[seq(eq3(fct[i]),i=1..d+1)]:
x:='x';
x:=m*h:
w := [seq(beta[i],i=1..d+1)];
M,b := GenerateMatrix(sys,w);
M1:=-M: V:=-b:
Vect_beta:=(M1)^(-1).V:
return Vect_beta;
end proc;

Hello dear all,

I use maple 16, x64. When I run this code:

Student[Calculus1][ApproximateInt](cos(y/(-1+y)), y = 0 .. 1, method = lower, iterations = 1)

it results in "0.0667344650", exactly equal with the result of executing

Student[Calculus1][ApproximateInt](cos(y/(-1+y)), y = 0 .. 1, method = lower, iterations = 10000000000)

Any idea?

 

Best regards

The Stone-Weierstass theorem  in its simplest form asserts that every continuous function defined on a closed interval [a,b] can be uniformly approximated as closely as desired by a polynomial function. Let us consider a concrete function (say, arcsin(sqrt(x))) on a concrete interval (for example,[0,1]) and a concrete rate (for instance, 0.01). The question arises: what can be  the degree of an approximating polynomial?
Looking in the constructive proof of the Weierstrass theorem (for example, see
W. Rudin, Principles of mathematical analysis. Third Ed. McGraw-Hill Inc. New York-...-Toronto. 1976, pp. 159-160 SWT.docx), we find the inequality for degree n in terms of the modulus of the  continuity delta and the maximum of the modulus M of a function f on [0,1]: 4*M*sqrt(n)*(1-delta^2)^n < epsilon/2.
Next, we find the modulus of the continuity of arcsin(sqrt(x)) with help of Maple (namely, the DirectSearch package):
>restart;
>CM := proc (delta) DirectSearch:-Search(abs(arcsin((x+delta)^(1/2))-arcsin(x^(1/2))),
 {0 <= x, 0 <= x+delta, x <= 1, x+delta <= 1}, maximize)
end proc
. Now delta is fitting to satisfy CM(delta) < 0.01:
>Digits := 15: CM(0.9999640e-4);


[0.999995686126010e-2, [x = .999900003599999], 18].
At last, we find the required degree, taking into account M=Pi/2 for arcsin(sqrt(x)) on [0,1]:
>DirectSearch:-SolveEquations((4*Pi*(1/2))*sqrt(n)*(1-0.9999640e-4^2)^n = (1/2)*10^(-2), {n >= 10^9}, tolerances = 10^(-8));


[3.68635028417869*10^(-35), Vector(1, {(1) = -0.607153216591882e-17}),[n = 1.77870508105403*10^9], 74]
The obtained result is unexpected and impressive. However, this is only an estimate of the degree for the chosen construction. There are different ways to construct an approximating polynomial. For example, let us take the interpolating polynomial.
>with(CurveFitting): Digits := 200: P := PolynomialInterpolation([seq([(1/200)*j,
evalf(arcsin(sqrt((1/200)*j)), 180)], j = 0 .. 200)], x);

8.57260524574724504043891781488113281218267308627010084942700641\
2116721658995225354525109649870447266086431479184935898860221001\
6810627259201248204607733508370522655937863029427984169024474693\
605019813*10^(-24)*x^200+
3.4102471291087052576144785068387656673244314487588\
37173451046570851636655790486463697061695256004409457030\
661587523327337363549630285194598139656219506035056874382\
5412929520214254752642899246978334986*10^83*x^199+...
The whole long output of sort(P) can be seen in the attached file.
>DirectSearch:-Search(abs(arcsin(sqrt(x))-P), {x >= 0, x <= 1}, maximize, tolerances = 10^(-10));


[0.7028873160870935332477114389520278374486329450431055674880288416078\

033259753063018233397798614e-2, [x = .999760629733897552108099038488344\

76319065496787157065017717228830101\

791752323133523143936216508553686883680060439608736578363\

678796478147136266075441732651036025656505033942652374763794644368578081487], 22]
See SWtheorem.mw

1 2 Page 1 of 2