(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\OneCo-1606\\V1"];
<< OneCo.m


AutoAd[\[Tau]_. Subscript[a, i_,j_]][x_] := Module[{bas,\[Beta], k, f,t, guess, InitCond, DiffCond, sol},
bas=ReplacePart[LBasis[{i,j}], 1->\[Beta]];
n=0; guess=Sum[
\!\(\*SubscriptBox[\(f\), \(++n\)]\)[t]y,{y,bas}];
InitCond=Table[0==Coefficient[(guess/.t->0)-x, y] /. {Subscript[(c|u|w), _]->0,\[Epsilon]->0}, {y,bas}];
DiffCond=Table[0==Coefficient[D[guess,t]-b[Expand[\[Tau] Subscript[a, i,j]],guess], y] /. {Subscript[(c|u|w), _]->0,\[Epsilon]->0}, {y,bas}];
{sol}=DSolve[InitCond\[Union]DiffCond, Table[Subscript[f, k][t],{k,n}], t];
guess /. sol /. t->1
]



