Items tagged with numeric

restart;
with(Statistics):
with(LinearAlgebra):
with(Optimization):
Digits:=10:

                      #********************************************#
lambda:=6328*10^(-10);
w0:=0.0005;
a0:=0.0004; 
z0:= a0^2/(4*lambda);  
N:=(a0^2)/(z0*lambda); 

                      #*********************************************#


u0:=x->((2/(w0*sqrt(2)))*sqrt(1./Pi))*LaguerreL(0,0.,2.*(x*a0)^2/w0^2)*exp(-(x*a0)^2/w0^2);

                                 
           #*****************************************************************
u1:=y->evalf(I*2*Pi*N*exp(-I*Pi*N*((a0*y)/a0)^2)*evalf(int(x*u0(x)*exp(-I*Pi*N*x^2)*BesselJ(0,2*Pi*N*(a0*y)*x/a0),x=0..1)));

          #*****************************************************************

u2:=r2->evalf(I*2*Pi*N*exp(-I*Pi*N*(r2/a0)^2)*evalf(int(y*u1(y)*exp(-I*Pi*N*y^2)*BesselJ(0,2*Pi*N*r2*y/a0),y=0..1)));

          #*****************************************************************
u3:=r3->evalf(I*2*Pi*N*exp(-I*Pi*N*(r3/a0)^2)*evalf(int(z*u2(z)*exp(-I*Pi*N*z^2)*BesselJ(0,2*Pi*N*r3*z/a0),z=0..1)));

 plot(abs(u3(r3)),r3=-0.0008..0.0008);

 

Hi guys,

I run my code and after a point all the numerical values are followed by a dot. Why is that? Also the symbolic variables have a 1. before them.

Thanks a lot!

Hello! Hope everyone would be fine. I want to solve the following system of ODEs please help to find the numerical solution

N := .6; alpha := .4; beta := .1; Nt := .2; Pr := .5; Nb := .1; s := .2; lambda[1] := 1; delta := .5; gm := 1; Sc := 1:L:=1:

Eq1 := (alpha*s+1)*(diff(F(eta), eta, eta, eta))-(F(eta)+(1/2)*s*eta)*(diff(F(eta), eta, eta))+((1/2)*(diff(F(eta), eta))-s)*(diff(F(eta), eta))-2*(G(eta)^2-(1-gm)^2)-2*lambda[1]*(H(eta)+N*Y(eta))-(alpha+beta-(1/4)*delta*(diff(F(eta), eta, eta, eta)))*(diff(F(eta), eta, eta))^2-(alpha-2*beta)*(diff(F(eta), eta))*(diff(F(eta), eta, eta, eta))-(2*(alpha-beta-(1/4)*delta*(diff(F(eta), eta, eta, eta))))*(diff(G(eta), eta))^2-(2*(alpha-(1/4)*delta*(diff(F(eta), eta, eta))))*G(eta)*(diff(G(eta), eta, eta)) = 0; Eq2 := (alpha*s+1)*(diff(G(eta), eta, eta))-F(eta)*(diff(G(eta), eta))+G(eta)*(diff(F(eta), eta))+s*(1-gm-G(eta)-(1/2)*eta*(diff(G(eta), eta)))-(1/2)*alpha*s*eta*(diff(G(eta), eta, eta, eta))+((3/2)*alpha+beta)*G(eta)*(diff(F(eta), eta, eta, eta))-((1/2)*alpha+beta)*(diff(F(eta), eta))*(diff(G(eta), eta, eta))-delta*((diff(F(eta), eta, eta))^2+6*(diff(G(eta), eta))^2)*(diff(G(eta), eta, eta)) = 0; Eq3 := (diff(H(eta), eta, eta))/Pr-F(eta)*(diff(H(eta), eta))+(1/2)*H(eta)*(diff(F(eta), eta))-s*(2*H(eta)+(1/2)*eta*(diff(H(eta), eta)))+Nb*(diff(H(eta), eta))*(diff(Y(eta), eta))+Nt*(diff(H(eta), eta))^2 = 0; Eq4 := (diff(Y(eta), eta, eta))/Sc-F(eta)*(diff(Y(eta), eta))+(1/2)*Y(eta)*(diff(F(eta), eta))-s*(2*Y(eta)+(1/2)*eta*(diff(Y(eta), eta)))+Nt*(diff(H(eta), eta, eta))/Nb = 0;

IC1 := F(0) = 0, (D(F))(0) = 0, G(0) = gm, H(0) = 1, Y(0) = 1; IC2 := (D(F))(L) = 0, G(L) = 1-gm, (D(G))(L) = 0, H(L) = 0, Y(L) = 0; dsys1 := {Eq1, Eq2, Eq3, Eq4, IC1, IC2}; dsol1 := dsolve(dsys1, numeric, output = listprocedure, range = 0 .. L);

dsol1f := subs(dsol1, F(eta));

dsol1g := subs(dsol1, G(eta)); dsol1h := subs(dsol1, H(eta)); dsol1y := subs(dsol1, Y(eta));

With my best regards and sincerely.

hi.

how i can dsolve this differential equations?

thanks

ich.mw
 

restart; Digits := 50; dsol1 := dsolve({diff(F(eta), eta, eta, eta)+.5*H(eta)*((diff(F(eta), eta))^2+F(eta)*(diff(F(eta), eta, eta)))/G(eta)^2+2*(diff(G(eta), eta))*(diff(F(eta), eta, eta))/G(eta)-(diff(H(eta), eta))*(diff(F(eta), eta, eta))/H(eta) = 0, diff(G(eta), eta, eta)+H(eta)*((diff(F(eta), eta))*G(eta)+.5*F(eta)*(diff(eta, eta)))/G(eta)^2+2*(diff(G(eta), eta))^2/G(eta)-((diff(H(eta), eta))*(diff(H(eta), eta)))/H(eta)+(diff(F(eta), eta, eta))^2-(H(eta)/G(eta))^2 = 0, diff(H(eta), eta, eta)+(.5*1.3)*H(eta)*(5*(diff(F(eta), eta))*H(eta)+F(eta)*(diff(H(eta), eta)))/G(eta)^2+2*(diff(G(eta), eta))*(diff(H(eta), eta))/G(eta)-(diff(H(eta), eta))^2/H(eta)+(1.3*1.44)*H(eta)*(diff(F(eta), eta, eta))/G(eta)-(1.3*1.92)*(H(eta)/G(eta))^3 = 0, F(0) = 0, G(0) = 0, H(0) = 0, (D(F))(0) = 1, (D(F))(1) = 0, (D(G))(0) = 0, (D(H))(0) = 0}, 'maxmesh' = 900, numeric, output = listprocedure, method = bvp[middefer], abserr = 0.1e-2); fy := eval(F(eta), dsol1)

Error, invalid input: eval received dsol1, which is not valid for its 2nd argument, eqns

 

 

NULL


 

Download ich.mw

 

Let us consider

restart; Digits := 20; evalf(Int(abs(cos(1/t)), t = 0 .. 0.1e-1), 3);
   -0.639e-2

Pay your attention to the minus sign. Simply no words. Mma produces 0.006377.

evalf@Int.mw

Hello,

I'm trying to solve a system of 9 ODE in a model of a chemical reactor. But, unfortunately, when I try to plot the curves, I get the following error message: Error, (in f) unable to store '[Float(undefined)]+8.5809018712796' when datatype=float[8]

Can anyone help me please? I read some related problems here, but couldnt find a solution yet.

Thanks for your time

Best regards

i have solved the coupled equations .... and want to subtract a constant

i want to subtract constant from the result of last equation

r_p_m.mw

Dears

Hope everything fine with you. I want to solve the attached problem by numarically and want to plot it but failed. Please see the attachement and correct it. I am waiting your positive respone. 

System_of_ODEs.mw

With my best regards and sincerely.

Muhammad Usman

School of Mathematical Sciences 
Peking University, Beijing, China

i don't know much about maple, i need to solve the following odes system... I study a little on the help page of maple about numeric[midrich] that takes bvp and deal singularity as well but dint know how to used in the following system

odes.mw

Respected member!
Please help me to find the solution of attached problem, I am a new user so pleaes forgive any mistakes.
 

``


``


``

NULL

NULL

restart

R := 2.0

2.0

(1)

ODEforNum := r^3*((D@@4)(F))(r)+r^2*R*((D@@3)(F))(r)*(F(r)-2/R)+R*((D(F))(r)-r*((D@@2)(F))(r))*(r*(D(F))(r)+3*(F(r)-1/R)) = 0:

numsol := dsolve({BCSforNum, ODEforNum}, numeric, output = listprocedure)

Error, (in dsolve/numeric/bvp/convertsys) unable to convert to an explicit first-order system

 

``


 

Download mplprimes.mw

i am trying to solve an initial value problem i have applied a numeric code but the progam give me an error but instead of several efforts i couldn't correc the error..rho(r).mw

 

how to find the integration of z(x) form 0 to x with the given condition...
 

diff(z(x), x) = x*Typesetting:-delayDotProduct(b, 1+3*y(x))/(a^2*(1-(x/a)^2));

diff(z(x), x) = x*(b.(1+3*y(x)))/(a^2*(1-x^2/a^2))

(1)

`%%where%`, y(x) = b*((1-(x/a)^2)^(1/2)-(1-(R/a)^2)^(1/2))/(3*(1-(R/a)^2)^(1/2)-(1-(x/a)^2)^(1/2));

`%%where%`, y(x) = b*((1-x^2/a^2)^(1/2)-(1-R^2/a^2)^(1/2))/(3*(1-R^2/a^2)^(1/2)-(1-x^2/a^2)^(1/2))

(2)

with*condition; -1; z(R) = ln(1-(R/a)^2)

z(R) = ln(1-R^2/a^2)

(3)

``


 

Download integration.mw

I wrote an equation and intended to iterate P(r) till that value of r when P(r) becomes 0.what is the value of r for which P(r)=0, and also  obtained its convergent decreasing graph which show convergence of P(r) to 0.
 

restart

NULL

G := 6.6743*10^(-8);

0.6674300000e-7

 

0.2997924580e11

 

0.7321400000e36

(1)

``

sys2 := diff(P(r), r) = -G*(epsilon+P(r))*((8.98*10^14*(1/3))*Pi*r^3+4*Pi*r^3*P(r)/c^2)/(c^2*(r^2-(2*G*r*(8.98*10^14*(1/3))*Pi*(r^3))/c^2)), P(0.1e-9) = 8.5561*10^34

diff(P(r), r) = -0.7426160269e-28*(0.7321400000e36+P(r))*(0.2993333333e15*Pi*r^3+0.4450600224e-20*Pi*r^3*P(r))/(r^2-0.4445794614e-13*r^4*Pi), P(0.1e-9) = 0.8556100000e35

(2)

``

``


 

Download decreasing_graph.mw


 

refresh

refresh

(1)

G := 6.6743*10^(-8); 1; c := 2.99792458*10^10; 1; pi := 3.143; 1; rho := 5.3808*10^14

0.6674300000e-7

 

0.2997924580e11

 

3.143

 

0.5380800000e15

(2)

diff(P(r), r) = -G*(rho*c^2+P(r))*((4*pi*r^3*(1/3))*rho+4*Pi*r^3*P(r)/c^2)/(c^2*(r^2-2*G*r*(4*pi*r^3*(1/3))*rho/c^2)), diff(v(r), r) = 1.485232054*10^(-28)*((4*pi*r^3*(1/3))*rho+4.450600224*10^(-21)*Pi*r^3*P(r))/(r^2-1.485232054*10^(-28)*r*(4*pi*r^3*(1/3))*rho)

diff(P(r), r) = -0.7426160269e-28*(0.4836021866e36+P(r))*(0.2254913920e16*r^3+0.4450600224e-20*Pi*r^3*P(r))/(r^2-0.3349070432e-12*r^4), diff(v(r), r) = 0.1485232054e-27*(0.2254913920e16*r^3+0.4450600224e-20*Pi*r^3*P(r))/(r^2-0.3349070432e-12*r^4)

(3)

condition; -1; P(0) = 0, v(1014030) = -.4283

P(0) = 0, v(1014030) = -.4283

(4)

``


 

Download maple_soft.mw

I found the solution of P(r) at P(0)=0, but could obtain the result of v(r) at v(1014030)=-0.4283, v(r) may have a graph such that i can goes from -0.4283 to 0.

1 2 3 4 5 6 7 Last Page 1 of 26