1
$\begingroup$
tmax = 1.0; solqll = NDSolve[{D[Q[t, c1, c2], t] == 0, Q[0, c1, c2] == N[(1250 Sqrt[16 - c1^2 - 4 c2] E^(-50 (4 - c2)))/\[Pi] (1 - Exp[-100 ((16 - c1^2) (c2 (4 - c2)))])], Q[t, -4, c2] == 0, Q[t, 4, c2] == 0, Q[t, c1, 0] == 0, Q[t, c1, 4] == 0}, Q, {t, 0, tmax}, {c1, -4, 4}, {c2, 0, 4}] Evaluate[Q[t, c1, c2] /. solqll[[1]] /. c2 -> 3.95 /. t -> 0 /. c1 -> 0] (1250 Sqrt[16 - c1^2 - 4 c2] E^(-50 (4 - c2)))/\[Pi] /. c1 -> 0. /. c2 -> 3.95 (1250 Sqrt[16 - c1^2 - 4 c2] E^(-50 (4 - c2)))/\[Pi] (1 - Exp[-100 ((16 - c1^2) (c2 (4 - c2)))]) /. c1 -> 0. /. c2 -> 3.95 

"I am solving this using NDSolve but the value of the equation at t=0 is not matching with given initial condition"

$\endgroup$

1 Answer 1

5
$\begingroup$
$Version (* "14.3.0 for Mac OS X ARM (64-bit) (July 8, 2025)" *) Clear["Global`*"] tmax = 1; solqll = NDSolve[{D[Q[t, c1, c2], t] == 0, Q[0, c1, c2] == (1250 Sqrt[16 - c1^2 - 4 c2] E^(-50 (4 - c2)))/\[Pi] (1 - Exp[-100 ((16 - c1^2) (c2 (4 - c2)))]), Q[t, -4, c2] == 0, Q[t, 4, c2] == 0, Q[t, c1, 0] == 0, Q[t, c1, 4] == 0}, Q, {t, 0, tmax}, {c1, -4, 4}, {c2, 0, 4}, WorkingPrecision -> 12, MaxStepSize -> 1/20]; Q[t, c1, c2] /. solqll[[1]] /. c2 -> 3.95 /. t -> 0 /. c1 -> 0 (* 14.6062 *) (1250 Sqrt[16 - c1^2 - 4 c2] E^(-50 (4 - c2)))/\[Pi] (1 - Exp[-100 ((16 - c1^2) (c2 (4 - c2)))]) /. c1 -> 0 /. c2 -> 3.95 (* 14.6063 *) 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.