Bonsoir,

Je suis débutant sur le logiciel matlab, je ne sais pas comment résoudre cet exercice.
L'équation différentielle s'écrit : k*(1/2)*[w²(x)]''=-q(x)

Conditions initiales: w(x=0)=w1 ; w(x=L)=w2

L=460m; k=8.64m/day; qo=0.0044m/day
q(x)=q0 as well as the river water depths w1=8.5m and w2=10m

J'ai trouvé w²(x)=(-q0/k)*x²+[(w2²-w1²)/L + qo*L/k]x +w1²

Donc je dois compléter le code matlab ci-joint :

function [x,w] = aquifer_exact(N, param, bc)

% identify boundary conditions at left and right end
w_left = bc.w_val( find(bc.w_idx == 1) );
w_right = bc.w_val( find(bc.w_idx == max(bc.w_idx)) );

% vector of equidistant x coordinates
x = linspace(0,param.L,N);

% compute solution at coordinates stored in vector x
% w = ... PUT YOUR SOLUTION HERE ...

end

Je ne vois pas du tout ce qu'il faut mettre pour pouvoir insérer ma solution obtenu.
Merci beaucoup pour celui qui arrive m'aider .
Cordialement