SERVING THE QUANTITATIVE FINANCE COMMUNITY

Search found 9936 matches

by Alan
February 3rd, 2020, 5:39 pm
Forum: Politics Forum
Topic: Are you ready for Brexit?
Replies: 716
Views: 38741

Re: Are you ready for Brexit?

Speaking of "Rejoining", I wonder if Brits would support tearing up the Hong Kong handover agreement -- say, for example, if the people of Hong Kong voted overwhelmingly that that was their wish? 
by Alan
February 3rd, 2020, 5:32 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation


Is that St. Paul's London in the background?
Yes, whenever Hope Hicks testifies, they have to find a secret location.  
Can we expect some shock waves?
Certainly, given her unique characteristics.
by Alan
February 2nd, 2020, 9:27 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

1519870931505.png

Had to test "place inline". This is great!
Is that St. Paul's London in the background?
Yes, whenever Hope Hicks testifies, they have to find a secret location.  
by Alan
February 2nd, 2020, 7:15 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

1519870931505.png
Had to test "place inline". This is great!
by Alan
February 2nd, 2020, 6:24 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

I would urge you to draw the pictures! BTW how do I get a jpeg from my computer directly into a post? To display it in the post, just google "free image hosting" or some such, pick a site, upload, get a link ending in a supported picture format (.jpg, .png, .gif, others?), and insert the link into ...
by Alan
February 1st, 2020, 4:04 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Sure.  BTW, looking again at my Mathematica session, there's still a small glitch. I told Mathematica that [$]y_1 < y_2[$]. But, indeed since [$]\dot{\xi} < 0[$] for this problem, actually I should have said to Mathematica that [$]y_2 < y_1[$]. That makes both the l.h.s. and r.h.s. positive for [$]t...
by Alan
February 1st, 2020, 3:44 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Great, we all agree. Since I edited my code (see above), the code in your post is my old (wrong) code and my earlier (wrong) conclusion. 
by Alan
February 1st, 2020, 3:02 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

(* u_t = b(y) u_y *) Clear[b,integral]; b[x_] := x^2-1; integral[y1_,y2_] = Integrate[1/b[x],{x,y1,y2},  Assumptions->{-1<y1<1 && -1<y2<1 && y1 < y2}] 1/2 Log[((1+y1)(-1+y2))/((-1+y1) (1+y2))] Clear[Xif]; Xif = f/.Solve[integral[y,f]==t,f][[1]] ConditionalExpression[(-1+E^(2 t)-y-E^(2 t) y)/(-1-E^(...
by Alan
February 1st, 2020, 1:11 am
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Alan, NY = 500 = NT using Roberts Weiss fdm (max err= 3,52e-5) NY = NT = 1000, err = 1.1e-5 NY = NT = 2000, err = 3.21e-6 // copy from Excel not always works X MOC exact solution X FDM solution 0 0.385821 0 0.385824 0.002 0.38582 0.002 0.385822 0.004 0.385818 0.004 0.385821 0.006 0.385816 0.006 0.3...
by Alan
January 31st, 2020, 8:30 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

double f(double y) { // Initial conditions return std::exp(-y); } T = 20, NY = NT = 10 using upwind X MOC exact solution X FDM solution 0 0.385821307 0 0.379587712 0.1 0.385724622 0.1 0.37945997 0.2 0.385605221 0.2 0.379304392 0.3 0.385454033 0.3 0.379110744 0.4 0.385256415 0.4 0.378863056 0.5 0.38...
by Alan
January 31st, 2020, 7:30 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

@Daniel. No. Paul posted what he said was a solution to the original problem. I haven't checked it, but if it is correct, then you have to take [$]t \rightarrow -t[$] and that should be it for my [$]\xi^i[$], taking your a=b=1. Anyway, the simple cookbook for these 1D problem [$]V_t = b(x) V_x[$] is...
by Alan
January 31st, 2020, 6:49 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Just brainstorming, if the MOC can also be applied to this initlial value problem in the plane [$]-\infty \lt x,y \lt \infty[$] [$]\frac{\partial V}{\partial t} = a \frac{\partial V}{\partial x}  + b \frac{\partial V}{\partial y} [$] [$]V(x,y,0) = f(x,y)[$] Let's say [$]a > 0[$] and [$]b > 0[$] are...
by Alan
January 30th, 2020, 12:12 am
Forum: Politics Forum
Topic: Trump -- the last 100 days
Replies: 3363
Views: 155239

Re: Trump -- the last 100 days

Unrelated, but if they're going to subpoena John Bolton, they have to subpoena Hope Hicks. Why? Oh come on :D ...

Image   
 
by Alan
January 29th, 2020, 5:04 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Actually, my [$]\xi(t)[$] with [$]\xi(0) = y \in (0,1)[$] are increasing in [$]t[$]. After all [$]\dot{\xi}(t) = (1 - \xi(t))^2 > 0[$]. This may be a nomenclature issue on what we are calling the 'characteristics'??   Anyway, plot 'my' characteristics starting at [$]y>1[$] and you'll see the issue l...
by Alan
January 29th, 2020, 4:25 pm
Forum: Numerical Methods Forum
Topic: About solving a transport equation
Replies: 157
Views: 56282

Re: About solving a transport equation

Yeah, I hate when that happens, too. Esp. when math is posted, it's always best to wait several minutes for edits.
GZIP: On