Items tagged with nonlinear nonlinear Tagged Items Feed

Ok guys this is the problem i have a matrix wich is really the result of a semivariogram so it is like this 
plot([[0, 0], [1, 1], [2, 3], [3, 5], [4, 7], [5, 8], [6, 9], [7, 10], [8, 10.5], [9, 10], [10, 9.8], [11, 9.8], [12, 10.5], [13, 10.89], [14, 11.2], [15, 10.6], [16, 9.85], [17, 9.45], [18, 9.77], [19, 10.15], [20, 10.7], [21, 10.04], [22, 10], [23, 10.85], [24, 10.7], [25, 10.94], [26, 10.81], [27, 10.33]])thi is my semivariogram so i have to find the best model and fit it to it, i can't just throw a polynomial it has to be
spherical= h:= C((3/2)*x/a-(1/2)*x^3/a^3) 
expotencial=Upsilon := C(1-exp(-x/a))
Lineal= y:= p*x
or y:=p*x^a

so i want the maple to show me the variogram plot and the i select wich one of the models i will apply.
the problem is that i don't know how to apply the models so started something that could maybe lead to the values of C and A for the spherical and the xpotencial becouse the others too are easy.
------------------------------------------------------------------.--------------------------------------------------------
restart;
with(plots);
with(CurveFitting);
m3 := Matrix([[0, 0], [1, 2], [2, 5], [3, 7], [4, 10], [5, 14], [6, 15], [7, 15.4], [8, 15.8], [9, 16], [10, 16.4]]);
plot(m3);
Upsilon := C(1-exp(-x/a));
Upsilon := C((3/2)*x/a-(1/2)*x^3/a^3);
for C to 16 do
for a to 100 do
for x to 11 do
H := m3(x, 2);
R[C, a, x] := abs(Upsilon-H)
end do
end do
end do;
for r to 16 do
for j to 100 do
N[r, j] := sum(R[r, j, X], X = 1 .. 11);
if N[r, j] < 55 then
print(r, j)
end if
end do
end do;
k := 14*(3/2*((1/16)*xx)-(1/2)*xx^3/16^3);
multiple(plot, [m3, color = "Green"], [k, xx = 0 .. 11, color = "Blue"])
----------------------------------------------------------...................---------------------------------------
so in this code i rest the values of the model and the values of the matrix for differents C and a so i pick the min of the Sum to see wich C and a give me the min value but i didn't work quite well first is difficult to get the C and a and sometimes the new curve is just not similir to the semivariogram (Matrix) please help i tried 
k := NonlinearFit(C((3/2)*x/a-(1/2)*x^3/a^3), X, Y, x)
and 
k:=LeastSquares`(m3, v, curve = C*(1-exp(-x/a)))
but they don't let me because they aint linear on the parameters
please help 
if you are interested in this topic here is what i am trying to do but explained really well is for geological matters
http://www.kriging.com/PG1979/index.htm#Chapter_2+Part1

if want to help me use this matrix 
m3:= Matrix([[0, 0], [1, 1], [2, 3], [3, 5], [4, 7], [5, 8], [6, 9], [7, 10], [8, 10.5], [9, 10], [10, 9.8], [11, 9.8], [12, 10.5], [13, 10.89], [14, 11.2], [15, 10.6], [16, 9.85], [17, 9.45], [18, 9.77], [19, 10.15], [20, 10.7], [21, 10.04], [22, 10], [23, 10.85], [24, 10.7], [25, 10.94], [26, 10.81], [27, 10.33]])
for that matrix the spherical model is the best i know

goodbye

I am currently learning about nonlinear waves and and am having problems with my maple coding where I am plotting the characteristics of the initial value problem

$u_[t] + uu_[x] = 0$ where $u(x,t) = a$ if $x < -1$

                                               = $b$ if $ -1 < x < 1$

                                               = $c$ if $ x > 1$

where $a$, $b$ and $c$ are unequal constants. Also, there are 6 cases to this, $a > b > c$, $a > c > b$, $b > a >c$, $b > c > a$, $c > a > b$ and $c > b > a$. In each case I need to plot the characteristics (and where possible plot the rarefaction waves, but this bit is not necessary right now). My problem is that I am highly certain that my code is incorrect as I am unsure where/how to implement the fact that $a$, $b$ and $c$ vary since there are different cases. My current code is down below

 

 

restart: with(plots): with(plottools): with(PDEtools):
ploti:= implicitplot({seq(t*((k/2))+k/2-x,k=-10..-1)},x=-10..10,t=0..10,view=[-5..5,0..5],color=blue,thickness=2):
ploti2:= implicitplot({seq(t*(k/2)+k/2-x,k=-1..1)},x=-10..10,t=0..10,view=[-5..5,0..5],color=red,thickness=2):
ploti3:= implicitplot({seq(t*((k/2))+k/2-x,k=1..10)},x=-10..10,t=0..10,view=[-5..5,0..5],color=yellow,thickness=2):
display(ploti,ploti2,ploti3);

Any help would be much appreciated

 

I want to  get   nonlinear equations solutions using 'solve',but i always meet that the program running long long time,i want to stop this 'solve' procedure giving a limit time.how do i.can you help me.thanks a lot.

      Method for solving underdetermined systems of nonlinear equations. The idea of the method is to find a connected subset of a set of solutions of the system by moving along this subset from one point in different directions. The direction of movement can be changed in each point.

      Very simple example of  single equation with three variables:

                                   (x1 ^ 4 + x2 ^ 4 - 2) ^ 2 + x3 ^ 4 - 1 = 0;

      From the point (0, -1.31607, 0) or (0, 1., 0) or any point if it is a solution, we first move for a variety of solutions along a curve parallel to the axis Ox3, and then from each point of this curve is moving in a direction parallel to x1Ox2 or vice versa. So we get all the solutions.
      This works for any space of any number of the equations when the number of equations is less than the number of variables.
underdetermined_system.mw

 

 

 

    Intersection of surfaces:

x3-.25*(sin(4*x1)+sin(3*x2+x3)+sin(2*x2))=0;  (1)

(x1-xx1)^4+(x2-xx2)^4+(x3-xx3)^4-1=0;          (2)   

   Surface (1) and a set of surfaces (2). Point (xx1, xx2, xx3) belongs to (1). Moving along the surface (1), we compute its intersection with the surface (2).
   The program is very simple and its algorithm can be used for many other combinations of equations.

intersection_of_surfaces.mw  

How can one use maple to linearized nonlinear ODE of this type Linearize.mw

with maple.

Best regards.

 

I'd like to know how to ask Maple to find numerical solutions to underspecified systems of nonlinear equations.  For example, suppose I had a system of equations like this:

eq1 := y1 = tanh(x1);

eq2 := y2 = cosh(x1 + x2);

eq3 := y1 + y2 = 2.0;

Typing this:

fsolve([eq1, eq2, eq3]);

results in the following error:

Error, (in fsolve) number of equations, 3, does not match number of variables, 4

In this situation I can easily artificially restrict the system to find a solution.  For example, I can do:

eq4 := x1 = 0.0;

fsolve([eq1, eq2, eq3, eq4]);

which will result in the following solution:

{x1 = 0., x2 = 1.316957897, y1 = 0., y2 = 2.000000000}

The issue here is that I pulled x1 = 0.0; out of thin air.  Setting a single variable to zero would not work to solve an arbitrary set of nonlinear equations.  How can I ask Maple to find a single (not necessarily unique) solution to an underspecified system of nonlinear equations?

D_Method.mw

The classical Draghilev’s method.  Example of solving the system of two transcendental equations. For a single the initial approximation are searched 9 approximate solutions of the system.
(4*(x1^2+x2-11))*x1+2*x1+2*x2^2-14+cos(x1)=0;
2*x1^2+2*x2-22+(4*(x1+x2^2-7))*x2-sin(x2)=0; 
x01 := -1.; x02 := 1.;


Equation: ((x1+.25)^2+(x2-.2)^2-1)^2+(x3-.1)^2-.999=0;



a_cam_3D.mw


Cam mechanism animation.   Equation:  (xx2-1.24)^10+5*(xx1-.66)^10-9.=0
a_cam.mw

Hi all!

 

I do a small calculation and get a system of 6
nonlinear equations.
And "n" is the degree of the equation is float.

Here are the calculations that lead to the system.

 

restart;
 with(DirectSearch):
 B:=1: 
 q:=1: 
 l:=1: 
 n:=4.7:
 V:=0.05:
 N:=1200:
 
 
 kappa:=Vector(N+1,[]):
 theta:=Vector(N+1,[]):
 u:=Vector(N,[]):
 M:=Vector(N,[]):
 Z:=Vector(N,[]):
 
 M_F:=q*(6*l*(z-l)-z^2/2):
 M_1:=piecewise((z<l), l-z, 0):
 M_2:=piecewise((z<2*l), 2*l-z, 0):
 M_3:=piecewise((z<3*l), 3*l-z, 0):
 M_4:=piecewise((z<4*l), 4*l-z, 0):
 M_5:=piecewise((z<5*l), 5*l-z, 0):
 M_6:=6*l-z:
 M_finish:=(X_1,X_2,X_3,X_4,X_5,X_6,z)->M_1*X_1+M_2*X_2+M_3*X_3+M_4*X_4+M_5*X_5+M_6*X_6+M_F:
 
 
 kappa_old:=0:
 theta_old:=0:
 u_old:=0:
 M_old:=0:
 
 
 step:=6*l/N:
 u[1]:=0:
 kappa[1]:=0:
 theta[1]:=0:
 
 
 
 
 for i from 2 to N do
 
 z:=i*step:
 kappa_new:=kappa_old+B/V*(M_finish(X_1,X_2,X_3,X_4,X_5,X_6,z))^n*step:
 
 theta_new:=theta_old+1/2*(kappa_old+kappa_new)*step:
 
 u_new:=u_old+1/2*(theta_old+theta_new)*step:
 
 Z[i]:=z:
 kappa[i]:=kappa_new:
 theta[i]:=theta_new:
 u[i]:=u_new:
 kappa_old:=kappa_new:
 theta_old:=theta_new:
 u_old:=u_new:
 
 end do:
 
 So,my system:


 u[N/6]=0;
 u[N/3]=0;
 u[N/2]=0;
 u[2*N/3]=0;
 u[5*N/6]=0;
 u[N]=0;

 

I want to ask advice on how to solve the system.
I wanted to use Newton's method, but I don't know the initial values X_1..X_6.

Tried to set the values X_1..X_6 and to minimize the functional
Fl:=(X_1,X_2,X_3,X_4,X_5,X_6)->(u[N/6])^2+(u[N/3])^2+(u[N/2])^2+(u[2*N/3])^2+(u[5*N/6])^2+(u[N])^2:

with the help with(DirectSearch):
GlobalOptima(Fl);
But I don't know what to do next

Please, advise me how to solve the system! I would be grateful for examples!

 

Hi,

 

I'm trying to solve the following differential equation numerically with dsolve:

but dsolve gives me this error:

> res := dsolve(DGL, numeric, parameters = [y0, A, B, C, E]);
Error, (in DEtools/convertsys) unable to convert to an explicit first-order system

I think the problem is that I use the wrong solver. Does Maple provide a solver which is capable of solving this kind of equations (nonlinear ODE)?

 

Thanks in advance!

 

1 2 3 4 5 Page 1 of 5