Items tagged with numeric

Feed

hi every one, i want to plot an indefinite integral  , it is some what complex and maple can not compute the answer, ( but numeric integration can be computed) , but we want to plot the output, what should we do ? tnx for help in advance

corrected.mw

Please illustrate the answer on the example of a simple wave equation, for instance.

#first_question :how can i solve set of nonlinear ODEs,faster or using any packages ?
#second_question :what can be some boundary conditions for this type of nonlinear ODEs? how many BCs are required for this set of nonlinear ODEs? ( to use numeric solution)

 


 

restart:with(DEtools):with(DifferentialAlgebra):

eq[1]:=diff(N(r),r$2)+2/r*diff(N(r),r)+diff(phi(r),r)/phi(r)*diff(N(r),r)-mu^2/(32*phi(r))*N(r);

diff(diff(N(r), r), r)+2*(diff(N(r), r))/r+(diff(phi(r), r))*(diff(N(r), r))/phi(r)-(1/32)*mu^2*N(r)/phi(r)

(1)

eq[2]:=diff(phi(r),r$2)+2/r*diff(phi(r),r)-1/2*diff(phi(r),r)^2/phi(r)-8*diff(N(r),r)^2/(omega*(1-2*G*M/r))*phi(r);

diff(diff(phi(r), r), r)+2*(diff(phi(r), r))/r-(1/2)*(diff(phi(r), r))^2/phi(r)-8*(diff(N(r), r))^2*phi(r)/(omega*(1-2*G*M/r))

(2)

dsolve({eq[1],eq[2]});

``


 

Download nonlinear_ODE.mw

the Initial value problem is well defined but i could not find solution of the problem. A number of method have been used but all are useless. How to obtained graph of the all equations. Also can we find the value of R (radius) where P is zero.coupled_IVP.mw

I am trying to solve the particular system of partial differential equation. But I get the following error.pdsolve.mw
 

"restart;  f(x,y):=x*y:  yy:={diff(f(x,y),x)=0,diff(f(x,y),y)=0}:  ee:=pdsolve(yy,numeric);"

Error, (in pdsolve/numeric) invalid subscript selector

 

``


 

Download pdsolve.mw

 

when I enter a trig function as cos(pi/2) I get as a return the same input.  What I would like is the numeric answer displayed. also there are times when I don't want pi in the answer but a numeric value calculated based on pi * whatever.

Thanks

Bill

i want to draw plot Y[1] . but i cant. thank you

restart;
with(LinearAlgebra); Digits := 15; with(plots); with(Optimization);;
NewM := Matrix(5, 5, [[4119700.0000, 0., 0., 0., 0.], [0., 175900.0000, 0., 0., 0.], [0., 0., 52796., 0., 0.], [0., 0., 0., 2002900.0000, 0.], [0., 0., 0., 0., 21711.]]); NewK := Matrix(5, 5, [[18278000.0000, 0., 0., 0., 0.], [0., 8478500.0000, 0., 0., 0.], [0., 0., 3874800.0000, 0., 0.], [0., 0., 0., 494710000.0000, 0.], [0., 0., 0., 0., 7707500.0000]]); L := Vector[column](5, [400689.480747934, 36882.2103608425, 24223.1756570268, 7197.48654698287, 5007.64668721342]); V := Vector[column](5, [4.43679672962542, 48.2014976972537, 73.3916065733549, 246.999805581163, 355.012621460930]);
Phi := Matrix(5, 5, [[1., 1., 1., 1., 1.], [1.96506022575420, 1.62041320563413, 1.42204109823483, 0.548765310483432e-1, -.795724394004826], [9.21473910149806, 2.36597630710861, -.837387679777313, -8.23805381555997, 0.930594200639915e-1], [10.5672146719479, 1.26937656539014, -.710851068914949, 12.5801876194058, -0.564138989400088e-1], [12.4282433098880, -2.02516824673162, .481291188486771, -1.71479964168293, 0.513709374343217e-2]]);
NS := ImportMatrix("D:/tabas.txt", datatype = float[8]);
t_NS := NS[() .. (), 1];
acc_NS := NS[() .. (), 2];
plot(NS, t = 0 .. 4.5, size = [800, 400]);
acc := unapply(CurveFitting:-Spline(t_NS, acc_NS/(9.81), t, degree = 1), t);
eq := seq(diff(x[i](t), t$2)+(2*0.5e-1)*sqrt(V[i])*(diff(x[i](t), t))+V[i]*x[i](t) = L[i]*acc(t)/NewM[i, i], i = 1 .. 5, 1);
ic := [seq({x[i](0) = 0, (D(x[i]))(0) = 0}, i = 1 .. 5, 1)];
sol := seq(dsolve({eq[i], ic[i][]}, numeric, output = listprocedure), i = 1 .. 5, 1);
Z := `<,>`(seq(sol[i][2], i = 1 .. 5));
#Y := Phi . Z;
#odeplot(Y[1], t = 0 .. 10);
tabas.txt

1.mw

i want to draw plot Y[1] . but i cant. thank for you

i want to take this equation

restart;
with(LinearAlgebra); Digits := 70; with(plots);

K := Matrix(5, 5, [[18278000.0000, 0., 0., 0., 0.], [0., 8478500.0000, 0., 0., 0.], [0., 0., 3874800.0000, 0., 0.], [0., 0., 0., 494710000.0000, 0.], [0., 0., 0., 0., 7707500.0000]]); M := Matrix(5, 5, [[4119700.0000, 0., 0., 0., 0.], [0., 175900.0000, 0., 0., 0.], [0., 0., 52796., 0., 0.], [0., 0., 0., 2002900.0000, 0.], [0., 0., 0., 0., 21711.]]); L := Vector[column](5, [400689.48, 36882.21, 24223.175, 7197.4865, 5007.6466]); V := Vector[column](5, [4.4368, 48.201, 73.39160, 246.999, 355.012]);
NS := ImportMatrix("D:/tabas.txt", datatype = float[8]);
t_NS := NS[() .. (), 1];
acc_NS := NS[() .. (), 2];
plot(NS, t = 0 .. 4.5, size = [800, 400]);
acc := unapply(CurveFitting:-Spline(t_NS, acc_NS/(9.81), t, degree = 1), t);
eq := seq(diff(x[i](t), t$2)+(2*0.5e-1)*sqrt(V[i])*(diff(x[i](t), t))+V[i]*x[i](t) = L[i]/M[i, i], i = 1 .. 5, 1);
ic := [seq({x[i](0) = 0, (D(x[i]))(0) = 0}, i = 1 .. 6, 1)];
res := evalf(seq(dsolve({eq[i], ic[i][]}, numeric, method = rkf45), i = 1 .. 5, 1));
Z := `<,>`(res[1], res[2], res[3], res[4], res[5]);
Y := Phi . Z;
#odeplot(rhs(Y[1]), t = 0 .. 4)

import file text

tabas.txt

restart;
res := dsolve({25*(diff(y(t), t, t))+4*(diff(y(t), t))-3*y(t) = cos(3*t), y(0) = 0, (D(y))(0) = 1}, numeric, method = rkf45);
with(Optimization);
Maximize(res, t = 0 .. 4);
 

how can i solve Like this example in maple. approximate solution differential equation with Rayleigh–Ritz method